home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Finder Dungeon / source code / MoreFiles 1.4.6 / C Headers / MoreFilesExtras.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-06-28  |  102.8 KB  |  2,884 lines  |  [TEXT/MPS ]

  1. /*
  2. **    Apple Macintosh Developer Technical Support
  3. **
  4. **    A collection of useful high-level File Manager routines.
  5. **
  6. **    by Jim Luther, Apple Developer Technical Support Emeritus
  7. **
  8. **    File:        MoreFilesExtras.h
  9. **
  10. **    Copyright © 1992-1996 Apple Computer, Inc.
  11. **    All rights reserved.
  12. **
  13. **    You may incorporate this sample code into your applications without
  14. **    restriction, though the sample code has been provided "AS IS" and the
  15. **    responsibility for its operation is 100% yours.  However, what you are
  16. **    not permitted to do is to redistribute the source as "DSC Sample Code"
  17. **    after having made changes. If you're going to re-distribute the source,
  18. **    we require that you make it clear in the source that the code was
  19. **    descended from Apple Sample Code, but that you've made changes.
  20. */
  21.  
  22. #ifndef __MOREFILESEXTRAS__
  23. #define __MOREFILESEXTRAS__
  24.  
  25. #include <Types.h>
  26. #include <Files.h>
  27.  
  28. #include "Optimization.h"
  29.  
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33.  
  34. /*****************************************************************************/
  35.  
  36. /*
  37. **    Macros to get information out of GetVolParmsInfoBuffer
  38. */
  39.  
  40. #define    isNetworkVolume(volParms)    ((volParms).vMServerAdr != 0)
  41. #define    hasLimitFCBs(volParms)        (((volParms).vMAttrib & (1L << bLimitFCBs)) != 0)
  42. #define    hasLocalWList(volParms)        (((volParms).vMAttrib & (1L << bLocalWList)) != 0)
  43. #define    hasNoMiniFndr(volParms)        (((volParms).vMAttrib & (1L << bNoMiniFndr)) != 0)
  44. #define hasNoVNEdit(volParms)        (((volParms).vMAttrib & (1L << bNoVNEdit)) != 0)
  45. #define hasNoLclSync(volParms)        (((volParms).vMAttrib & (1L << bNoLclSync)) != 0)
  46. #define hasTrshOffLine(volParms)    (((volParms).vMAttrib & (1L << bTrshOffLine)) != 0)
  47. #define hasNoSwitchTo(volParms)        (((volParms).vMAttrib & (1L << bNoSwitchTo)) != 0)
  48. #define hasNoDeskItems(volParms)    (((volParms).vMAttrib & (1L << bNoDeskItems)) != 0)
  49. #define hasNoBootBlks(volParms)        (((volParms).vMAttrib & (1L << bNoBootBlks)) != 0)
  50. #define hasAccessCntl(volParms)        (((volParms).vMAttrib & (1L << bAccessCntl)) != 0)
  51. #define hasNoSysDir(volParms)        (((volParms).vMAttrib & (1L << bNoSysDir)) != 0)
  52. #define hasExtFSVol(volParms)        (((volParms).vMAttrib & (1L << bHasExtFSVol)) != 0)
  53. #define hasOpenDeny(volParms)        (((volParms).vMAttrib & (1L << bHasOpenDeny)) != 0)
  54. #define hasCopyFile(volParms)        (((volParms).vMAttrib & (1L << bHasCopyFile)) != 0)
  55. #define hasMoveRename(volParms)        (((volParms).vMAttrib & (1L << bHasMoveRename)) != 0)
  56. #define hasDesktopMgr(volParms)        (((volParms).vMAttrib & (1L << bHasDesktopMgr)) != 0)
  57. #define hasShortName(volParms)        (((volParms).vMAttrib & (1L << bHasShortName)) != 0)
  58. #define hasFolderLock(volParms)        (((volParms).vMAttrib & (1L << bHasFolderLock)) != 0)
  59. #define hasPersonalAccessPrivileges(volParms) \
  60.         (((volParms).vMAttrib & (1L << bHasPersonalAccessPrivileges)) != 0)
  61. #define hasUserGroupList(volParms)    (((volParms).vMAttrib & (1L << bHasUserGroupList)) != 0)
  62. #define hasCatSearch(volParms)        (((volParms).vMAttrib & (1L << bHasCatSearch)) != 0)
  63. #define hasFileIDs(volParms)        (((volParms).vMAttrib & (1L << bHasFileIDs)) != 0)
  64. #define hasBTreeMgr(volParms)        (((volParms).vMAttrib & (1L << bHasBTreeMgr)) != 0)
  65. #define hasBlankAccessPrivileges(volParms) \
  66.         (((volParms).vMAttrib & (1L << bHasBlankAccessPrivileges)) != 0)
  67.  
  68. /*****************************************************************************/
  69.  
  70.  
  71. /*
  72. **    Bit masks and macros to get common information out of ioACUser returned
  73. **    by PBGetCatInfo (remember to clear ioACUser before calling PBGetCatInfo
  74. **    since some file systems don't bother to set this field).
  75. **
  76. **    Use the GetDirAccessRestrictions or FSpGetDirAccessRestrictions
  77. **    functions to retrieve the ioACUser access restrictions byte for
  78. **    a folder.
  79. **
  80. **    Note:    The access restriction byte returned by PBGetCatInfo is the
  81. **            2's complement of the user's privileges byte returned in
  82. **            ioACAccess by PBHGetDirAccess.
  83. */
  84.  
  85. enum
  86. {
  87.     /* bits defined in ioACUser */
  88.     acUserNoSeeFoldersMask    = 0x01,
  89.     acUserNoSeeFilesMask    = 0x02,
  90.     acUserNoMakeChangesMask    = 0x04,
  91.     acUserNotOwnerMask        = 0x80,
  92.     
  93.     /* mask for just the access restriction bits */
  94.     acUserAccessMask        = 0x07,
  95.     
  96.     /* common access privilege settings */
  97.     acUserFull                = 0x00,                        /* no access restiction bits on */
  98.     acUserNone                = acUserAccessMask,            /* all access restiction bits on */
  99.     acUserDropBox            = acUserNoSeeFoldersMask + acUserNoSeeFilesMask, /* make changes, but not see files or folders */
  100.     acUserBulletinBoard        = acUserNoMakeChangesMask    /* see files and folders, but not make changes */
  101. };
  102.  
  103. /* Macros for testing ioACUser bits */
  104. #define    userIsOwner(ioACUser)    \
  105.         (((ioACUser) & acUserNotOwnerMask) == 0)
  106. #define    userHasFullAccess(ioACUser)    \
  107.         (((ioACUser) & (acUserAccessMask)) == acUserFull)
  108. #define    userHasDropBoxAccess(ioACUser)    \
  109.         (((ioACUser) & acUserAccessMask) == acUserDropBox)
  110. #define    userHasBulletinBoard(ioACUser)    \
  111.         (((ioACUser) & acUserAccessMask) == acUserBulletinBoard)
  112. #define    userHasNoAccess(ioACUser)        \
  113.         (((ioACUser) & acUserAccessMask) == acUserNone)
  114.  
  115. /*****************************************************************************/
  116.  
  117. /*
  118. **    Deny mode permissions for use with the HOpenAware, HOpenRFAware,
  119. **    FSpOpenAware, and FSpOpenRFAware functions.
  120. */
  121.  
  122. enum
  123. {
  124.     dmNone            = 0x0000,
  125.     dmNoneDenyRd    = 0x0010,
  126.     dmNoneDenyWr    = 0x0020,
  127.     dmNoneDenyRdWr    = 0x0030,
  128.     dmRd            = 0x0001,    /* Single writer, multiple readers; the readers */
  129.     dmRdDenyRd        = 0x0011,
  130.     dmRdDenyWr        = 0x0021,    /* Browsing - equivalent to fsRdPerm */
  131.     dmRdDenyRdWr    = 0x0031,
  132.     dmWr            = 0x0002,
  133.     dmWrDenyRd        = 0x0012,
  134.     dmWrDenyWr        = 0x0022,
  135.     dmWrDenyRdWr    = 0x0032,
  136.     dmRdWr            = 0x0003,    /* Shared access - equivalent to fsRdWrShPerm */
  137.     dmRdWrDenyRd    = 0x0013,
  138.     dmRdWrDenyWr    = 0x0023,    /* Single writer, multiple readers; the writer */
  139.     dmRdWrDenyRdWr    = 0x0033    /* Exclusive access - equivalent to fsRdWrPerm */
  140. };
  141.     
  142. /*****************************************************************************/
  143.  
  144. #if PRAGMA_ALIGN_SUPPORTED
  145. #pragma options align=mac68k
  146. #endif
  147.  
  148. /*
  149. **    For those times where you need to use more than one kind of File Manager parameter
  150. **    block but don't feel like wasting stack space, here's a parameter block you can reuse.
  151. */
  152.  
  153. union UniversalFMPB
  154. {
  155.     ParamBlockRec    PB;
  156.     CInfoPBRec        ciPB;
  157.     DTPBRec            dtPB;
  158.     HParamBlockRec    hPB;
  159.     CMovePBRec        cmPB;
  160.     WDPBRec            wdPB;
  161.     FCBPBRec        fcbPB;
  162. };
  163. typedef union UniversalFMPB UniversalFMPB;
  164. typedef UniversalFMPB *UniversalFMPBPtr, **UniversalFMPBHandle;
  165.  
  166.  
  167. /*
  168. **    Used by GetUGEntries to return user or group lists
  169. */
  170.  
  171. struct UGEntry
  172. {
  173.     short    objType;    /* object type: -1 = group; 0 = user */
  174.     long    objID;        /* the user or group ID */
  175.     Str31    name;        /* the user or group name */
  176. };
  177. typedef struct UGEntry UGEntry;
  178. typedef UGEntry *UGEntryPtr, **UGEntryHandle;
  179.  
  180.  
  181. typedef unsigned char Str8[9];
  182.  
  183.  
  184. /*
  185. **    I use the following record instead of the AFPVolMountInfo structure in Files.h
  186. */
  187.  
  188. struct MyAFPVolMountInfo
  189. {
  190.     short length;                /* length of this record */
  191.     VolumeType media;            /* type of media, always AppleShareMediaType */
  192.     short flags;                /* 0 = normal mount; set bit 0 to inhibit greeting messages */
  193.     char nbpInterval;            /* NBP interval parameter; 7 is a good choice */
  194.     char nbpCount;                /* NBP count parameter; 5 is a good choice */
  195.     short uamType;                /* User Authentication Method */
  196.     short zoneNameOffset;        /* offset from start of record to zoneName */
  197.     short serverNameOffset;        /* offset from start of record to serverName */
  198.     short volNameOffset;        /* offset from start of record to volName */
  199.     short userNameOffset;        /* offset from start of record to userName */
  200.     short userPasswordOffset;    /* offset from start of record to userPassword */
  201.     short volPasswordOffset;    /* offset from start of record to volPassword */
  202.     Str31 zoneName;                /* server's AppleTalk zone name */                    
  203.     Str31 serverName;            /* server name */                    
  204.     Str27 volName;                /* volume name */                    
  205.     Str31 userName;                /* user name (zero length Pascal string for guest) */
  206.     Str8 userPassword;            /* user password (zero length Pascal string if no user password) */                    
  207.     char filler1;                /* to word align volPassword */
  208.     Str8 volPassword;            /* volume password (zero length Pascal string if no volume password) */                    
  209.     char filler2;                /* to end record on word boundry */
  210. };
  211. typedef struct MyAFPVolMountInfo MyAFPVolMountInfo;
  212. typedef MyAFPVolMountInfo *MyAFPVolMountInfoPtr, **MyAFPVolMountInfoHandle;
  213.  
  214. #if PRAGMA_ALIGN_SUPPORTED
  215. #pragma options align=reset
  216. #endif
  217.  
  218. /*****************************************************************************/
  219.  
  220. pascal    void    TruncPString(StringPtr destination,
  221.                              ConstStr255Param source,
  222.                              short maxLength);
  223. /*    ¶ International friendly string truncate routine.
  224.     The TruncPString function copies up to maxLength characters from
  225.     the source Pascal string to the destination Pascal string. TruncPString
  226.     ensures that the truncated string ends on a single-byte character, or on
  227.     the last byte of a multi-byte character.
  228.     
  229.     destination        output:    destination Pascal string.
  230.     source            input:    source Pascal string.
  231.     maxLength        output:    The maximum allowable length of the destination
  232.                             string.
  233. */
  234.  
  235. /*****************************************************************************/
  236.  
  237. pascal    Ptr    GetTempBuffer(long buffReqSize,
  238.                           long *buffActSize);
  239. /*    ¶ Allocate a temporary copy or search buffer.
  240.     The GetTempBuffer function allocates a temporary buffer for file system
  241.     operations which is at least 1024 bytes (1K) and a multiple of
  242.     1024 bytes.
  243.     
  244.     buffReqSize        input:    Size you'd like the buffer to be.
  245.     buffActSize        output:    Size of buffer allocated.
  246.     function result    output:    Pointer to memory allocated or nil if no memory
  247.                             was available. The caller is responsible for
  248.                             disposing of this buffer with DisposePtr.
  249. */
  250.  
  251. /*****************************************************************************/
  252.  
  253. pascal    OSErr    GetVolumeInfoNoName(ConstStr255Param pathname,
  254.                                     short vRefNum,
  255.                                     HParmBlkPtr pb);
  256. /*    ¶ Call PBHGetVInfoSync ignoring returned name.
  257.     GetVolumeInfoNoName uses pathname and vRefNum to call PBHGetVInfoSync
  258.     in cases where the returned volume name is not needed by the caller.
  259.     The pathname and vRefNum parameters are not touched, and the pb
  260.     parameter is initialized by PBHGetVInfoSync except that ioNamePtr in
  261.     the parameter block is always returned as NULL (since it might point
  262.     to GetVolumeInfoNoName's local variable tempPathname).
  263.  
  264.     I noticed using this code in several places, so here it is once.
  265.     This reduces the code size of MoreFiles.
  266.  
  267.     pathName    input:    Pointer to a full pathname or nil.  If you pass in a 
  268.                         partial pathname, it is ignored. A full pathname to a
  269.                         volume must end with a colon character (:).
  270.     vRefNum        input:    Volume specification (volume reference number, working
  271.                         directory number, drive number, or 0).
  272.     pb            input:    A pointer to HParamBlockRec.
  273.                 output:    The parameter block as filled in by PBHGetVInfoSync
  274.                         except that ioNamePtr will always be NULL.
  275.     
  276.     Result Codes
  277.         noErr                0        No error
  278.         nsvErr                -35        No such volume
  279.         paramErr            -50        No default volume, or pb was NULL
  280. */
  281.  
  282. /*****************************************************************************/
  283.  
  284. pascal    OSErr GetCatInfoNoName(short vRefNum,
  285.                                long dirID,
  286.                                ConstStr255Param name,
  287.                                CInfoPBPtr pb);
  288. /*    ¶ Call PBGetCatInfoSync ignoring returned name.
  289.     GetCatInfoNoName uses vRefNum, dirID and name to call PBGetCatInfoSync
  290.     in cases where the returned object is not needed by the caller.
  291.     The vRefNum, dirID and name parameters are not touched, and the pb
  292.     parameter is initialized by PBGetCatInfoSync except that ioNamePtr in
  293.     the parameter block is always returned as NULL (since it might point
  294.     to GetCatInfoNoName's local variable tempName).
  295.  
  296.     I noticed using this code in several places, so here it is once.
  297.     This reduces the code size of MoreFiles.
  298.  
  299.     vRefNum            input:    Volume specification.
  300.     dirID            input:    Directory ID.
  301.     name            input:    Pointer to object name, or nil when dirID
  302.                             specifies a directory that's the object.
  303.     pb                input:    A pointer to CInfoPBRec.
  304.                     output:    The parameter block as filled in by
  305.                             PBGetCatInfoSync except that ioNamePtr will
  306.                             always be NULL.
  307.     
  308.     Result Codes
  309.         noErr                0        No error
  310.         nsvErr                -35        No such volume
  311.         ioErr                -36        I/O error
  312.         bdNamErr            -37        Bad filename
  313.         fnfErr                -43        File not found
  314.         paramErr            -50        No default volume
  315.         dirNFErr            -120    Directory not found or incomplete pathname
  316.         afpAccessDenied        -5000    User does not have the correct access
  317.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  318.         
  319. */
  320.  
  321. /*****************************************************************************/
  322.  
  323. pascal    OSErr    DetermineVRefNum(ConstStr255Param pathname,
  324.                                  short vRefNum,
  325.                                  short *realVRefNum);
  326. /*    ¶ Determine the real volume reference number.
  327.     The DetermineVRefNum function determines the volume reference number of
  328.     a volume from a pathname, a volume specification, or a combination
  329.     of the two.
  330.     WARNING: Volume names on the Macintosh are *not* unique -- Multiple
  331.     mounted volumes can have the same name. For this reason, the use of a
  332.     volume name or full pathname to identify a specific volume may not
  333.     produce the results you expect.  If more than one volume has the same
  334.     name and a volume name or full pathname is used, the File Manager
  335.     currently uses the first volume it finds with a matching name in the
  336.     volume queue.
  337.  
  338.     pathName    input:    Pointer to a full pathname or nil.  If you pass in a 
  339.                         partial pathname, it is ignored. A full pathname to a
  340.                         volume must end with a colon character (:).
  341.     vRefNum        input:    Volume specification (volume reference number, working
  342.                         directory number, drive number, or 0).
  343.     realVRefNum    output:    The real volume reference number.
  344.     
  345.     Result Codes
  346.         noErr                0        No error
  347.         nsvErr                -35        No such volume
  348.         paramErr            -50        No default volume
  349. */
  350.  
  351. /*****************************************************************************/
  352.  
  353. pascal    OSErr    HGetVInfo(short volReference,
  354.                           StringPtr volName,
  355.                           short *vRefNum,
  356.                           unsigned long *freeBytes,
  357.                           unsigned long *totalBytes);
  358. /*    ¶ Get information about a mounted volume.
  359.     The HGetVInfo function returns the name, volume reference number,
  360.     available space (in bytes), and total space (in bytes) for the
  361.     specified volume. You can specify the volume by providing its drive
  362.     number, volume reference number, or 0 for the default volume.
  363.     This routine is compatible with volumes up to 4 gigabytes.
  364.     
  365.     volReference    input:    The drive number, volume reference number,
  366.                             or 0 for the default volume.
  367.     volName            input:    A pointer to a buffer (minimum Str27) where
  368.                             the volume name is to be returned or must
  369.                             be nil.
  370.                     output:    The volume name.
  371.     vRefNum            output:    The volume reference number.
  372.     freeBytes        output:    The number of free bytes on the volume.
  373.                             freeBytes is an unsigned long value.
  374.     totalBytes        output:    The total number of bytes on the volume.
  375.                             totalBytes is an unsigned long value.
  376.     
  377.     Result Codes
  378.         noErr                0        No error
  379.         nsvErr                -35        No such volume
  380.         paramErr            -50        No default volume
  381.     
  382.     __________
  383.     
  384.     Also see:    XGetVInfo
  385. */
  386.  
  387. /*****************************************************************************/
  388.  
  389. pascal    OSErr    XGetVInfo(short volReference,
  390.                           StringPtr volName,
  391.                           short *vRefNum,
  392.                           UnsignedWide *freeBytes,
  393.                           UnsignedWide *totalBytes);
  394. /*    ¶ Get extended information about a mounted volume.
  395.     The XGetVInfo function returns the name, volume reference number,
  396.     available space (in bytes), and total space (in bytes) for the
  397.     specified volume. You can specify the volume by providing its drive
  398.     number, volume reference number, or 0 for the default volume.
  399.     This routine is compatible with volumes up to 2 terabytes.
  400.     
  401.     volReference    input:    The drive number, volume reference number,
  402.                             or 0 for the default volume.
  403.     volName            input:    A pointer to a buffer (minimum Str27) where
  404.                             the volume name is to be returned or must
  405.                             be nil.
  406.                     output:    The volume name.
  407.     vRefNum            output:    The volume reference number.
  408.     freeBytes        output:    The number of free bytes on the volume.
  409.                             freeBytes is an UnsignedWide value.
  410.     totalBytes        output:    The total number of bytes on the volume.
  411.                             totalBytes is an UnsignedWide value.
  412.     
  413.     Result Codes
  414.         noErr                0        No error
  415.         nsvErr                -35        No such volume
  416.         paramErr            -50        No default volume
  417.     
  418.     __________
  419.     
  420.     Also see:    HGetVInfo
  421. */
  422.  
  423. /*****************************************************************************/
  424.  
  425. pascal    OSErr    CheckVolLock(ConstStr255Param pathname,
  426.                              short vRefNum);
  427. /*    ¶ Determine if a volume is locked.
  428.     The CheckVolLock function determines if a volume is locked - either by
  429.     hardware or by software. If CheckVolLock returns noErr, then the volume
  430.     is not locked.
  431.  
  432.     pathName    input:    Pointer to a full pathname or nil.  If you pass in a 
  433.                         partial pathname, it is ignored. A full pathname to a
  434.                         volume must end with a colon character (:).
  435.     vRefNum        input:    Volume specification (volume reference number, working
  436.                         directory number, drive number, or 0).
  437.     
  438.     Result Codes
  439.         noErr                0        No error - volume not locked
  440.         nsvErr                -35        No such volume
  441.         wPrErr                -44        Volume locked by hardware
  442.         vLckdErr            -46        Volume locked by software
  443.         paramErr            -50        No default volume
  444. */
  445.  
  446. /*****************************************************************************/
  447.  
  448. pascal    OSErr GetDriverName(short driverRefNum,
  449.                             Str255 driverName);
  450. /*    ¶ Get a device driver's name.
  451.     The GetDriverName function returns a device driver's name.
  452.  
  453.     driverRefNum    input:    The driver reference number.
  454.     driverName        output:    The driver's name.
  455.     
  456.     Result Codes
  457.         noErr                0        No error
  458.         badUnitErr            -21        Bad driver reference number
  459. */
  460.  
  461. /*****************************************************************************/
  462.  
  463. pascal    OSErr    FindDrive(ConstStr255Param pathname,
  464.                           short vRefNum,
  465.                           DrvQElPtr *driveQElementPtr);
  466. /*    ¶ Find a volume's drive queue element in the drive queue.
  467.     The FindDrive function returns a pointer to a mounted volume's
  468.     drive queue element.
  469.  
  470.     pathName            input:    Pointer to a full pathname or nil. If you
  471.                                 pass in a partial pathname, it is ignored.
  472.                                 A full pathname to a volume must end with
  473.                                 a colon character (:).
  474.     vRefNum                input:    Volume specification (volume reference
  475.                                 number, working directory number, drive
  476.                                 number, or 0).
  477.     driveQElementPtr    output:    Pointer to a volume's drive queue element
  478.                                 in the drive queue. DO NOT change the
  479.                                 DrvQEl.
  480.     
  481.     Result Codes
  482.         noErr                0        No error
  483.         nsvErr                -35        No such volume
  484.         paramErr            -50        No default volume
  485.         nsDrvErr            -56        No such drive
  486. */
  487.  
  488. /*****************************************************************************/
  489.  
  490. pascal    OSErr    GetDiskBlocks(ConstStr255Param pathname,
  491.                               short vRefNum,
  492.                               unsigned long *numBlocks);
  493. /*    ¶ Return the number of physical disk blocks on a disk drive.
  494.     The GetDiskBlocks function returns the number of physical disk
  495.     blocks on a disk drive. NOTE: This is not the same as volume
  496.     allocation blocks!
  497.  
  498.     pathName    input:    Pointer to a full pathname or nil. If you
  499.                         pass in a partial pathname, it is ignored.
  500.                         A full pathname to a volume must end with
  501.                         a colon character (:).
  502.     vRefNum        input:    Volume specification (volume reference
  503.                         number, working directory number, drive
  504.                         number, or 0).
  505.     numBlocks    output:    The number of physical disk blocks on the disk drive.
  506.     
  507.     Result Codes
  508.         noErr                0        No error
  509.         nsvErr                -35        No such volume
  510.         paramErr            -50        No default volume, driver reference
  511.                                     number is zero, ReturnFormatList
  512.                                     returned zero blocks, DriveStatus
  513.                                     returned an unknown value, or
  514.                                     driveQElementPtr->qType is unknown
  515.         nsDrvErr            -56        No such drive
  516.         statusErr            –18        Driver does not respond to this
  517.                                     status request
  518.         badUnitErr            –21        Driver reference number does not
  519.                                     match unit table
  520.         unitEmptyErr        –22        Driver reference number specifies
  521.                                     a nil handle in unit table
  522.         abortErr            –27        Request aborted by KillIO
  523.         notOpenErr            –28        Driver not open
  524. */
  525.  
  526. /*****************************************************************************/
  527.  
  528. pascal    OSErr    GetVolFileSystemID(ConstStr255Param pathname,
  529.                                    short vRefNum,
  530.                                    short *fileSystemID);
  531. /*    ¶ Get a volume's file system ID.
  532.     The GetVolFileSystemID function returned the file system ID of
  533.     a mounted volume. The file system ID identifies the file system
  534.     that handles requests to a particular volume. Here's a partial list
  535.     of file system ID numbers (only Apple's file systems are listed):
  536.         FSID    File System
  537.         -----   -----------------------------------------------------
  538.         $0000    Macintosh HFS or MFS
  539.         $0100    ProDOS File System
  540.         $0101    PowerTalk Mail Enclosures
  541.         $4147    ISO 9660 File Access (through Foreign File Access)
  542.         $4242    High Sierra File Access (through Foreign File Access)
  543.         $464D    QuickTake File System (through Foreign File Access)
  544.         $4953    Macintosh PC Exchange (MS-DOS)
  545.         $4A48    Audio CD Access (through Foreign File Access)
  546.         $4D4B    Apple Photo Access (through Foreign File Access)
  547.     
  548.     See the Technical Note "FL 35 - Determining Which File System
  549.     Is Active" and the "Guide to the File System Manager" for more
  550.     information.
  551.     
  552.     pathName        input:    Pointer to a full pathname or nil.  If you pass
  553.                             in a partial pathname, it is ignored. A full
  554.                             pathname to a volume must contain at least
  555.                             one colon character (:) and must not start with
  556.                             a colon character.
  557.     vRefNum            input:    Volume specification (volume reference number,
  558.                             working directory number, drive number, or 0).
  559.     fileSystemID    output:    The volume's file system ID.
  560.     
  561.     Result Codes
  562.         noErr                0        No error
  563.         nsvErr                -35        No such volume
  564.         paramErr            -50        No default volume, or pb was NULL
  565. */
  566.  
  567. /*****************************************************************************/
  568.  
  569. pascal    OSErr    GetVolState(ConstStr255Param pathname,
  570.                             short vRefNum,
  571.                             Boolean *volumeOnline,
  572.                             Boolean *volumeEjected,
  573.                             Boolean *driveEjectable,
  574.                             Boolean *driverWantsEject);
  575. /*    ¶ Returns a volume's online and eject information.
  576.     The GetVolState function determines if a volume is online or offline,
  577.     if an offline volume is ejected, and if the volume's driver is
  578.     ejectable or wants eject calls.
  579.     
  580.     pathName            input:    Pointer to a full pathname or nil.
  581.     vRefNum                input:    Volume specification (volume reference number,
  582.                                 working directory number, drive number, or 0).
  583.     volumeOnline        output:    True if the volume is online;
  584.                                 False if the volume is offline.
  585.     volumeEjected        output:    True if the volume is ejected (ejected
  586.                                 volumes are always offline); False if the
  587.                                 volume is not ejected.
  588.     driveEjectable        output:    True if the volume's drive is ejectable;
  589.                                 False if the volume's drive is not ejectable.
  590.     driverWantsEject    output:    True if the volume's driver wants an Eject
  591.                                 request after unmount (even if the drive
  592.                                 is not ejectable); False if the volume's
  593.                                 driver does not need an eject request.
  594.     
  595.     Result Codes
  596.         noErr                0        No error
  597.         nsvErr                -35        No such volume
  598.         paramErr            -50        No default volume, or pb was NULL
  599. */
  600.  
  601. /*****************************************************************************/
  602.  
  603. pascal    OSErr    UnmountAndEject(ConstStr255Param pathname,
  604.                                 short vRefNum);
  605. /*    ¶ Unmount and eject a volume.
  606.     The UnmountAndEject function unmounts and ejects a volume. The volume
  607.     is ejected only if it is ejectable and not already ejected.
  608.     
  609.     pathName    input:    Pointer to a full pathname or nil.  If you pass in a 
  610.                         partial pathname, it is ignored. A full pathname to a
  611.                         volume must end with a colon character (:).
  612.     vRefNum        input:    Volume specification (volume reference number, working
  613.                         directory number, drive number, or 0).
  614.     
  615.     Result Codes
  616.         noErr                0        No error
  617.         nsvErr                -35        No such volume
  618.         ioErr                -36        I/O error
  619.         bdNamErr            -37        Bad volume name
  620.         fBsyErr                -47        One or more files are open
  621.         paramErr            -50        No default volume
  622.         nsDrvErr            -56        No such drive
  623.         extFSErr            -58        External file system error - no file
  624.                                     system claimed this call.
  625. */
  626.  
  627. /*****************************************************************************/
  628.  
  629. pascal    OSErr    OnLine(FSSpecPtr volumes,
  630.                        short reqVolCount,
  631.                        short *actVolCount,
  632.                        short *volIndex);
  633. /*    ¶ Return the list of volumes currently mounted.
  634.     The OnLine function returns the list of volumes currently mounted in
  635.     an array of FSSpec records.
  636.     
  637.     A noErr result indicates that the volumes array was filled
  638.     (actVolCount == reqVolCount) and there may be additional volumes
  639.     mounted. A nsvErr result indicates that the end of the volume list
  640.     was found and actVolCount volumes were actually found this time.
  641.  
  642.     volumes        input:    Pointer to array of FSSpec where the volume list
  643.                         is returned.
  644.     reqVolCount    input:    Maximum number of volumes to return    (the number of
  645.                         elements in the volumes array).
  646.     actVolCount    output: The number of volumes actually returned.
  647.     volIndex    input:    The current volume index position. Set to 1 to
  648.                         start with the first volume.
  649.                 output:    The volume index position to get the next volume.
  650.                         Pass this value the next time you call OnLine to
  651.                         start where you left off.
  652.     
  653.     Result Codes
  654.         noErr                0        No error, but there are more volumes
  655.                                     to list
  656.         nsvErr                -35        No more volumes to be listed
  657.         paramErr            -50        volIndex was <= 0
  658. */
  659.  
  660. /*****************************************************************************/
  661.  
  662. pascal    OSErr SetDefault(short newVRefNum,
  663.                          long newDirID,
  664.                          short *oldVRefNum,
  665.                          long *oldDirID);
  666. /*    ¶ Set the default volume before making Standard I/O requests.
  667.     The SetDefault function sets the default volume and directory to the
  668.     volume specified by newVRefNum and the directory specified by newDirID.
  669.     The current default volume reference number and directory ID are
  670.     returned in oldVRefNum and oldDir and must be used to restore the
  671.     default volume and directory to their previous state *as soon as
  672.     possible* with the RestoreDefault function. These two functions are
  673.     designed to be used as a wrapper around Standard I/O routines where
  674.     the location of the file is implied to be the default volume and
  675.     directory. In other words, this is how you should use these functions:
  676.     
  677.         error = SetDefault(newVRefNum, newDirID, &oldVRefNum, &oldDirID);
  678.         if ( error == noErr )
  679.         {
  680.             // call the Stdio functions like remove, rename, tmpfile,
  681.             // fopen, freopen, etc. or non-ANSI extensions like
  682.             // fdopen,fsetfileinfo, -- create, open, unlink, etc. here!
  683.             
  684.             error = RestoreDefault(oldVRefNum, oldDirID);
  685.         }
  686.     
  687.     By using these functions as a wrapper, you won't need to open a working
  688.     directory (because SetDefault and RestoreDefault use HSetVol) and you
  689.     won't have to worry about the effects of using HSetVol (documented in
  690.     Technical Note "FL 11 - PBHSetVol is Dangerous" and in the
  691.     Inside Macintosh: Files book in the description of the HSetVol and 
  692.     PBHSetVol functions) because the default volume/directory is restored
  693.     before giving up control to code that might be affected by HSetVol.
  694.     
  695.     newVRefNum    input:    Volume specification (volume reference number,
  696.                         working directory number, drive number, or 0) of
  697.                         the new default volume.
  698.     newDirID    input:    Directory ID of the new default directory.
  699.     oldVRefNum    output: The volume specification to save for use with
  700.                         RestoreDefault.
  701.     oldDirID    output:    The directory ID to save for use with
  702.                         RestoreDefault.
  703.     
  704.     Result Codes
  705.         noErr                0        No error
  706.         nsvErr                -35        No such volume
  707.         bdNamErr            -37        Bad volume name
  708.         fnfErr                -43        Directory not found
  709.         paramErr            -50        No default volume
  710.         afpAccessDenied        -5000    User does not have access to the directory
  711.     
  712.     __________
  713.     
  714.     Also see:    RestoreDefault
  715. */
  716.  
  717. /*****************************************************************************/
  718.  
  719. pascal    OSErr RestoreDefault(short oldVRefNum,
  720.                              long oldDirID);
  721. /*    ¶ Restore the default volume after making Standard C I/O requests.
  722.     The RestoreDefault function restores the default volume and directory
  723.     to the volume specified by oldVRefNum and the directory specified by 
  724.     oldDirID. The oldVRefNum and oldDirID parameters were previously
  725.     obtained from the SetDefault function. These two functions are designed
  726.     to be used as a wrapper around Standard C I/O routines where the
  727.     location of the file is implied to be the default volume and directory.
  728.     In other words, this is how you should use these functions:
  729.     
  730.         error = SetDefault(newVRefNum, newDirID, &oldVRefNum, &oldDirID);
  731.         if ( error == noErr )
  732.         {
  733.             // call the Stdio functions like remove, rename, tmpfile,
  734.             // fopen, freopen, etc. or non-ANSI extensions like
  735.             // fdopen,fsetfileinfo, -- create, open, unlink, etc. here!
  736.             
  737.             error = RestoreDefault(oldVRefNum, oldDirID);
  738.         }
  739.     
  740.     By using these functions as a wrapper, you won't need to open a working
  741.     directory (because SetDefault and RestoreDefault use HSetVol) and you
  742.     won't have to worry about the effects of using HSetVol (documented in
  743.     Technical Note "FL 11 - PBHSetVol is Dangerous" and in the
  744.     Inside Macintosh: Files book in the description of the HSetVol and 
  745.     PBHSetVol functions) because the default volume/directory is restored
  746.     before giving up control to code that might be affected by HSetVol.
  747.     
  748.     oldVRefNum    input: The volume specification to restore.
  749.     oldDirID    input:    The directory ID to restore.
  750.     
  751.     Result Codes
  752.         noErr                0        No error
  753.         nsvErr                -35        No such volume
  754.         bdNamErr            -37        Bad volume name
  755.         fnfErr                -43        Directory not found
  756.         paramErr            -50        No default volume
  757.         rfNumErr            -51        Bad working directory reference number
  758.         afpAccessDenied        -5000    User does not have access to the directory
  759.     
  760.     __________
  761.     
  762.     Also see:    SetDefault
  763. */
  764.  
  765. /*****************************************************************************/
  766.  
  767. pascal    OSErr GetDInfo(short vRefNum,
  768.                        long dirID,
  769.                        ConstStr255Param name,
  770.                        DInfo *fndrInfo);
  771. /*    ¶ Get the finder information for a directory.
  772.     The GetDInfo function gets the finder information for a directory.
  773.  
  774.     vRefNum            input:    Volume specification.
  775.     dirID            input:    Directory ID.
  776.     name            input:    Pointer to object name, or nil when dirID
  777.                             specifies a directory that's the object.
  778.     fndrInfo        output:    If the object is a directory, then its DInfo.
  779.     
  780.     Result Codes
  781.         noErr                0        No error
  782.         nsvErr                -35        No such volume
  783.         ioErr                -36        I/O error
  784.         bdNamErr            -37        Bad filename
  785.         fnfErr                -43        File not found
  786.         paramErr            -50        No default volume
  787.         dirNFErr            -120    Directory not found or incomplete pathname
  788.         afpAccessDenied        -5000    User does not have the correct access
  789.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  790.         
  791.     __________
  792.     
  793.     Also see:    FSpGetDInfo, FSpGetFInfoCompat
  794. */
  795.  
  796. /*****************************************************************************/
  797.  
  798. pascal    OSErr FSpGetDInfo(const FSSpec *spec,
  799.                           DInfo *fndrInfo);
  800. /*    ¶ Get the finder information for a directory.
  801.     The FSpGetDInfo function gets the finder information for a directory.
  802.  
  803.     spec        input:    An FSSpec record specifying the directory.
  804.     fndrInfo    output:    If the object is a directory, then its DInfo.
  805.     
  806.     Result Codes
  807.         noErr                0        No error
  808.         nsvErr                -35        No such volume
  809.         ioErr                -36        I/O error
  810.         bdNamErr            -37        Bad filename
  811.         fnfErr                -43        File not found
  812.         paramErr            -50        No default volume
  813.         dirNFErr            -120    Directory not found or incomplete pathname
  814.         afpAccessDenied        -5000    User does not have the correct access
  815.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  816.         
  817.     __________
  818.     
  819.     Also see:    FSpGetFInfoCompat, GetDInfo
  820. */
  821.  
  822. /*****************************************************************************/
  823.  
  824. pascal    OSErr SetDInfo(short vRefNum,
  825.                        long dirID,
  826.                        ConstStr255Param name,
  827.                        const DInfo *fndrInfo);
  828. /*    ¶ Set the finder information for a directory.
  829.     The SetDInfo function sets the finder information for a directory.
  830.  
  831.     vRefNum            input:    Volume specification.
  832.     dirID            input:    Directory ID.
  833.     name            input:    Pointer to object name, or nil when dirID
  834.                             specifies a directory that's the object.
  835.     fndrInfo        input:    The DInfo.
  836.     
  837.     Result Codes
  838.         noErr                0        No error
  839.         nsvErr                -35        No such volume
  840.         ioErr                -36        I/O error
  841.         bdNamErr            -37        Bad filename
  842.         fnfErr                -43        File not found
  843.         fLckdErr            -45        File is locked
  844.         vLckdErr            -46        Volume is locked or read-only
  845.         paramErr            -50        No default volume
  846.         dirNFErr            -120    Directory not found or incomplete pathname
  847.         afpAccessDenied        -5000    User does not have the correct access
  848.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  849.     
  850.     __________
  851.     
  852.     Also see:    FSpSetDInfo, FSpSetFInfoCompat
  853. */
  854.  
  855. /*****************************************************************************/
  856.  
  857. pascal    OSErr FSpSetDInfo(const FSSpec *spec,
  858.                           const DInfo *fndrInfo);
  859. /*    ¶ Set the finder information for a directory.
  860.     The FSpSetDInfo function sets the finder information for a directory.
  861.  
  862.     spec        input:    An FSSpec record specifying the directory.
  863.     fndrInfo    input:    The DInfo.
  864.     
  865.     Result Codes
  866.         noErr                0        No error
  867.         nsvErr                -35        No such volume
  868.         ioErr                -36        I/O error
  869.         bdNamErr            -37        Bad filename
  870.         fnfErr                -43        File not found
  871.         fLckdErr            -45        File is locked
  872.         vLckdErr            -46        Volume is locked or read-only
  873.         paramErr            -50        No default volume
  874.         dirNFErr            -120    Directory not found or incomplete pathname
  875.         afpAccessDenied        -5000    User does not have the correct access
  876.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  877.     
  878.     __________
  879.     
  880.     Also see:    FSpSetFInfoCompat, SetDInfo
  881. */
  882.  
  883. /*****************************************************************************/
  884.  
  885. #if OLDROUTINENAMES
  886. #define    GetDirID(vRefNum, dirID, name, theDirID, isDirectory)    \
  887.         GetDirectoryID(vRefNum, dirID, name, theDirID, isDirectory)
  888. #endif
  889.  
  890. pascal    OSErr    GetDirectoryID(short vRefNum,
  891.                                long dirID,
  892.                                ConstStr255Param name,
  893.                                long *theDirID,
  894.                                Boolean *isDirectory);
  895. /*    ¶ Get the directory ID number of the directory specified.
  896.     The GetDirectoryID function gets the directory ID number of the
  897.     directory specified.  If a file is specified, then the parent
  898.     directory of the file is returned and isDirectory is false.  If
  899.     a directory is specified, then that directory's ID number is
  900.     returned and isDirectory is true.
  901.     WARNING: Volume names on the Macintosh are *not* unique -- Multiple
  902.     mounted volumes can have the same name. For this reason, the use of a
  903.     volume name or full pathname to identify a specific volume may not
  904.     produce the results you expect.  If more than one volume has the same
  905.     name and a volume name or full pathname is used, the File Manager
  906.     currently uses the first volume it finds with a matching name in the
  907.     volume queue.
  908.     
  909.     vRefNum            input:    Volume specification.
  910.     dirID            input:    Directory ID.
  911.     name            input:    Pointer to object name, or nil when dirID
  912.                             specifies a directory that's the object.
  913.     theDirID        output:    If the object is a file, then its parent directory
  914.                             ID. If the object is a directory, then its ID.
  915.     isDirectory        output:    True if object is a directory; false if
  916.                             object is a file.
  917.     
  918.     Result Codes
  919.         noErr                0        No error
  920.         nsvErr                -35        No such volume
  921.         ioErr                -36        I/O error
  922.         bdNamErr            -37        Bad filename
  923.         fnfErr                -43        File not found
  924.         paramErr            -50        No default volume
  925.         dirNFErr            -120    Directory not found or incomplete pathname
  926.         afpAccessDenied        -5000    User does not have the correct access
  927.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  928. */
  929.  
  930. /*****************************************************************************/
  931.  
  932. #if OLDROUTINENAMES
  933. #define    DirIDFromFSSpec(spec, theDirID, isDirectory)    \
  934.         FSpGetDirectoryID(spec, theDirID, isDirectory)
  935. #endif
  936.  
  937. pascal    OSErr    FSpGetDirectoryID(const FSSpec *spec,
  938.                                   long *theDirID,
  939.                                   Boolean *isDirectory);
  940. /*    ¶ Get the directory ID number of a directory.
  941.     The FSpGetDirectoryID function gets the directory ID number of the
  942.     directory specified by spec. If spec is to a file, then the parent
  943.     directory of the file is returned and isDirectory is false.  If
  944.     spec is to a directory, then that directory's ID number is
  945.     returned and isDirectory is true.
  946.     
  947.     spec            input:    An FSSpec record specifying the directory.
  948.     theDirID        output:    The directory ID.
  949.     isDirectory        output:    True if object is a directory; false if
  950.                             object is a file.
  951.     
  952.     Result Codes
  953.         noErr                0        No error
  954.         nsvErr                -35        No such volume
  955.         ioErr                -36        I/O error
  956.         bdNamErr            -37        Bad filename
  957.         fnfErr                -43        File not found
  958.         paramErr            -50        No default volume
  959.         dirNFErr            -120    Directory not found or incomplete pathname
  960.         afpAccessDenied        -5000    User does not have the correct access
  961.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  962. */
  963.  
  964. /*****************************************************************************/
  965.  
  966. pascal    OSErr    GetDirName(short vRefNum,
  967.                            long dirID,
  968.                            Str31 name);
  969. /*    ¶ Get the name of a directory from its directory ID.
  970.     The GetDirName function gets the name of a directory from its
  971.     directory ID.
  972.  
  973.     vRefNum        input:    Volume specification.
  974.     dirID        input:    Directory ID.
  975.     name        output:    Points to a Str31 where the directory name is to be
  976.                         returned.
  977.     
  978.     Result Codes
  979.         noErr                0        No error
  980.         nsvErr                -35        No such volume
  981.         ioErr                -36        I/O error
  982.         bdNamErr            -37        Bad filename
  983.         fnfErr                -43        File not found
  984.         paramErr            -50        No default volume or
  985.                                     name parameter was NULL
  986.         dirNFErr            -120    Directory not found or incomplete pathname
  987.         afpAccessDenied        -5000    User does not have the correct access
  988.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  989. */
  990.  
  991. /*****************************************************************************/
  992.  
  993. pascal    OSErr    GetIOACUser(short vRefNum,
  994.                             long dirID,
  995.                             ConstStr255Param name,
  996.                             SInt8 *ioACUser);
  997. /*    ¶ Get a directory's access restrictions byte.
  998.     GetIOACUser returns a directory's access restrictions byte.
  999.     Use the masks and macro defined in MoreFilesExtras to check for
  1000.     specific access priviledges.
  1001.     
  1002.     vRefNum        input:    Volume specification.
  1003.     dirID        input:    Directory ID.
  1004.     name        input:    Pointer to object name, or nil when dirID
  1005.                         specifies a directory that's the object.
  1006.     ioACUser    output:    The access restriction byte
  1007.     
  1008.     Result Codes
  1009.         noErr                0        No error
  1010.         nsvErr                -35        No such volume
  1011.         ioErr                -36        I/O error
  1012.         bdNamErr            -37        Bad filename
  1013.         fnfErr                -43        File not found
  1014.         paramErr            -50        No default volume
  1015.         dirNFErr            -120    Directory not found or incomplete pathname
  1016.         afpAccessDenied        -5000    User does not have the correct access
  1017.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1018. */
  1019.  
  1020. /*****************************************************************************/
  1021.  
  1022. pascal    OSErr    FSpGetIOACUser(const FSSpec *spec,
  1023.                                SInt8 *ioACUser);
  1024. /*    ¶ Get a directory's access restrictions byte.
  1025.     FSpGetIOACUser returns a directory's access restrictions byte.
  1026.     Use the masks and macro defined in MoreFilesExtras to check for
  1027.     specific access priviledges.
  1028.     
  1029.     spec        input:    An FSSpec record specifying the directory.
  1030.     ioACUser    output:    The access restriction byte
  1031.     
  1032.     Result Codes
  1033.         noErr                0        No error
  1034.         nsvErr                -35        No such volume
  1035.         ioErr                -36        I/O error
  1036.         bdNamErr            -37        Bad filename
  1037.         fnfErr                -43        File not found
  1038.         paramErr            -50        No default volume
  1039.         dirNFErr            -120    Directory not found or incomplete pathname
  1040.         afpAccessDenied        -5000    User does not have the correct access
  1041.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1042. */
  1043.  
  1044. /*****************************************************************************/
  1045.  
  1046. pascal    OSErr    GetParentID(short vRefNum,
  1047.                             long dirID,
  1048.                             ConstStr255Param name,
  1049.                             long *parID);
  1050. /*    ¶ Get the parent directory ID number of the specified object.
  1051.     The GetParentID function gets the parent directory ID number of the
  1052.     specified object.
  1053.     
  1054.     vRefNum        input:    Volume specification.
  1055.     dirID        input:    Directory ID.
  1056.     name        input:    Pointer to object name, or nil when dirID specifies
  1057.                         a directory that's the object.
  1058.     parID        output:    The parent directory ID of the specified object.
  1059.     
  1060.     Result Codes
  1061.         noErr                0        No error
  1062.         nsvErr                -35        No such volume
  1063.         ioErr                -36        I/O error
  1064.         bdNamErr            -37        Bad filename
  1065.         fnfErr                -43        File not found
  1066.         paramErr            -50        No default volume
  1067.         dirNFErr            -120    Directory not found or incomplete pathname
  1068.         afpAccessDenied        -5000    User does not have the correct access
  1069.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1070. */
  1071.  
  1072. /*****************************************************************************/
  1073.  
  1074. pascal    OSErr    GetFilenameFromPathname(ConstStr255Param pathname,
  1075.                                         Str255 filename);
  1076. /*    ¶ Get the object name from the end of a full or partial pathname.
  1077.     The GetFilenameFromPathname function gets the file (or directory) name
  1078.     from the end of a full or partial pathname. Returns notAFileErr if the
  1079.     pathname is nil, the pathname is empty, or the pathname cannot refer to
  1080.     a filename (with a noErr result, the pathname could still refer to a
  1081.     directory).
  1082.     
  1083.     pathname    input:    A full or partial pathname.
  1084.     filename    output:    The file (or directory) name.
  1085.     
  1086.     Result Codes
  1087.         noErr                0        No error
  1088.         notAFileErr            -1302    The pathname is nil, the pathname
  1089.                                     is empty, or the pathname cannot refer
  1090.                                     to a filename
  1091.     
  1092.     __________
  1093.     
  1094.     See also:    GetObjectLocation.
  1095. */
  1096.  
  1097. /*****************************************************************************/
  1098.  
  1099. pascal    OSErr    GetObjectLocation(short vRefNum,
  1100.                                   long dirID,
  1101.                                   ConstStr255Param pathname,
  1102.                                   short *realVRefNum,
  1103.                                   long *realParID,
  1104.                                   Str255 realName,
  1105.                                   Boolean *isDirectory);
  1106. /*    ¶ Get a file system object's location.
  1107.     The GetObjectLocation function gets a file system object's location -
  1108.     that is, its real volume reference number, real parent directory ID,
  1109.     and name. While we're at it, determine if the object is a file or directory.
  1110.     If GetObjectLocation returns fnfErr, then the location information
  1111.     returned is valid, but it describes an object that doesn't exist.
  1112.     You can use the location information for another operation, such as
  1113.     creating a file or directory.
  1114.     
  1115.     vRefNum        input:    Volume specification.
  1116.     dirID        input:    Directory ID.
  1117.     pathname    input:    Pointer to object name, or nil when dirID specifies
  1118.                         a directory that's the object.
  1119.     realVRefNum    output:    The real volume reference number.
  1120.     realParID    output:    The parent directory ID of the specified object.
  1121.     realName    output:    The name of the specified object (the case of the
  1122.                         object name may not be the same as the object's
  1123.                         catalog entry on disk - since the Macintosh file
  1124.                         system is not case sensitive, it shouldn't matter).
  1125.     isDirectory    output:    True if object is a directory; false if object
  1126.                         is a file.
  1127.     
  1128.     Result Codes
  1129.         noErr                0        No error
  1130.         nsvErr                -35        No such volume
  1131.         ioErr                -36        I/O error
  1132.         bdNamErr            -37        Bad filename
  1133.         fnfErr                -43        File not found
  1134.         paramErr            -50        No default volume
  1135.         dirNFErr            -120    Directory not found or incomplete pathname
  1136.         notAFileErr            -1302    The pathname is nil, the pathname
  1137.                                     is empty, or the pathname cannot refer
  1138.                                     to a filename
  1139.         afpAccessDenied        -5000    User does not have the correct access
  1140.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1141.     
  1142.     __________
  1143.     
  1144.     See also:    FSMakeFSSpecCompat
  1145. */
  1146.  
  1147. /*****************************************************************************/
  1148.  
  1149. pascal    OSErr    GetDirItems(short vRefNum,
  1150.                             long dirID,
  1151.                             ConstStr255Param name,
  1152.                             Boolean getFiles,
  1153.                             Boolean getDirectories,
  1154.                             FSSpecPtr items,
  1155.                             short reqItemCount,
  1156.                             short *actItemCount,
  1157.                             short *itemIndex);
  1158. /*    ¶ Return a list of items in a directory.
  1159.     The GetDirItems function returns a list of items in the specified
  1160.     directory in an array of FSSpec records. File, subdirectories, or
  1161.     both can be returned in the list.
  1162.     
  1163.     A noErr result indicates that the items array was filled
  1164.     (actItemCount == reqItemCount) and there may be additional items
  1165.     left in the directory. A fnfErr result indicates that the end of
  1166.     the directory list was found and actItemCount items were actually
  1167.     found this time.
  1168.  
  1169.     vRefNum            input:    Volume specification.
  1170.     dirID            input:    Directory ID.
  1171.     name            input:    Pointer to object name, or nil when dirID
  1172.                             specifies a directory that's the object.
  1173.     getFiles        input:    Pass true to have files added to the items list.
  1174.     getDirectories    input:    Pass true to have directories added to the
  1175.                             items list.
  1176.     items            input:    Pointer to array of FSSpec where the item list
  1177.                             is returned.
  1178.     reqItemCount    input:    Maximum number of items to return (the number
  1179.                             of elements in the items array).
  1180.     actItemCount    output: The number of items actually returned.
  1181.     itemIndex        input:    The current item index position. Set to 1 to
  1182.                             start with the first item in the directory.
  1183.                     output:    The item index position to get the next item.
  1184.                             Pass this value the next time you call
  1185.                             GetDirItems to start where you left off.
  1186.     
  1187.     Result Codes
  1188.         noErr                0        No error, but there are more items
  1189.                                     to list
  1190.         nsvErr                -35        No such volume
  1191.         ioErr                -36        I/O error
  1192.         bdNamErr            -37        Bad filename
  1193.         fnfErr                -43        File not found, there are no more items
  1194.                                     to be listed.
  1195.         paramErr            -50        No default volume or itemIndex was <= 0
  1196.         dirNFErr            -120    Directory not found or incomplete pathname
  1197.         afpAccessDenied        -5000    User does not have the correct access
  1198.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1199. */
  1200.  
  1201. /*****************************************************************************/
  1202.  
  1203. pascal    OSErr    DeleteDirectoryContents(short vRefNum,
  1204.                                          long dirID,
  1205.                                         ConstStr255Param name);
  1206. /*    ¶ Delete the contents of a directory.
  1207.     The DeleteDirectoryContents function deletes the contents of a directory.
  1208.     All files and subdirectories in the specified directory are deleted.
  1209.     If a locked file or directory is encountered, it is unlocked and then
  1210.     deleted.  If any unexpected errors are encountered,
  1211.     DeleteDirectoryContents quits and returns to the caller.
  1212.     
  1213.     vRefNum    input:    Volume specification.
  1214.     dirID    input:    Directory ID.
  1215.     name    input:    Pointer to directory name, or nil when dirID specifies
  1216.                     a directory that's the object.
  1217.     
  1218.     Result Codes
  1219.         noErr                0        No error
  1220.         nsvErr                -35        No such volume
  1221.         ioErr                -36        I/O error
  1222.         bdNamErr            -37        Bad filename
  1223.         fnfErr                -43        File not found
  1224.         wPrErr                -44        Hardware volume lock    
  1225.         fLckdErr            -45        File is locked    
  1226.         vLckdErr            -46        Software volume lock    
  1227.         fBsyErr                -47        File busy, directory not empty, or working directory control block open    
  1228.         paramErr            -50        No default volume
  1229.         dirNFErr            -120    Directory not found or incomplete pathname
  1230.         afpAccessDenied        -5000    User does not have the correct access
  1231.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1232.     
  1233.     __________
  1234.     
  1235.     Also see:    DeleteDirectory
  1236. */
  1237.  
  1238. /*****************************************************************************/
  1239.  
  1240. pascal    OSErr    DeleteDirectory(short vRefNum,
  1241.                                 long dirID,
  1242.                                 ConstStr255Param name);
  1243. /*    ¶ Delete a directory and its contents.
  1244.     The DeleteDirectory function deletes a directory and its contents.
  1245.     All files and subdirectories in the specified directory are deleted.
  1246.     If a locked file or directory is encountered, it is unlocked and then
  1247.     deleted.  After deleting the directories contents, the directory is
  1248.     deleted. If any unexpected errors are encountered, DeleteDirectory
  1249.     quits and returns to the caller.
  1250.     
  1251.     vRefNum    input:    Volume specification.
  1252.     dirID    input:    Directory ID.
  1253.     name    input:    Pointer to directory name, or nil when dirID specifies
  1254.                     a directory that's the object.
  1255.     
  1256.     Result Codes
  1257.         noErr                0        No error
  1258.         nsvErr                -35        No such volume
  1259.         ioErr                -36        I/O error
  1260.         bdNamErr            -37        Bad filename
  1261.         fnfErr                -43        File not found
  1262.         wPrErr                -44        Hardware volume lock
  1263.         fLckdErr            -45        File is locked
  1264.         vLckdErr            -46        Software volume lock
  1265.         fBsyErr                -47        File busy, directory not empty, or working directory control block open    
  1266.         paramErr            -50        No default volume
  1267.         dirNFErr            -120    Directory not found or incomplete pathname
  1268.         afpAccessDenied        -5000    User does not have the correct access
  1269.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1270.     
  1271.     __________
  1272.     
  1273.     Also see:    DeleteDirectoryContents
  1274. */
  1275.  
  1276. /*****************************************************************************/
  1277.  
  1278. pascal    OSErr    CheckObjectLock(short vRefNum,
  1279.                                 long dirID,
  1280.                                 ConstStr255Param name);
  1281. /*    ¶ Determine if a file or directory is locked.
  1282.     The CheckObjectLock function determines if a file or directory is locked.
  1283.     If CheckObjectLock returns noErr, then the file or directory
  1284.     is not locked. If CheckObjectLock returns fLckdErr, the it is locked.
  1285.     
  1286.     vRefNum    input:    Volume specification.
  1287.     dirID    input:    Directory ID.
  1288.     name    input:    Pointer to object name, or nil when dirID specifies
  1289.                     a directory that's the object.
  1290.     
  1291.     Result Codes
  1292.         noErr                0        No error
  1293.         nsvErr                -35        No such volume
  1294.         ioErr                -36        I/O error
  1295.         bdNamErr            -37        Bad filename
  1296.         fnfErr                -43        File not found
  1297.         fLckdErr            -45        File is locked
  1298.         paramErr            -50        No default volume
  1299.         dirNFErr            -120    Directory not found or incomplete pathname
  1300.         afpAccessDenied        -5000    User does not have the correct access
  1301.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1302.     
  1303.     __________
  1304.     
  1305.     Also see:    FSpCheckObjectLock
  1306. */
  1307.  
  1308. /*****************************************************************************/
  1309.  
  1310. pascal    OSErr    FSpCheckObjectLock(const FSSpec *spec);
  1311. /*    ¶ Determine if a file or directory is locked.
  1312.     The FSpCheckObjectLock function determines if a file or directory is locked.
  1313.     If FSpCheckObjectLock returns noErr, then the file or directory
  1314.     is not locked.
  1315.     
  1316.     spec    input:    An FSSpec record specifying the object.
  1317.     
  1318.     Result Codes
  1319.         noErr                0        No error
  1320.         nsvErr                -35        No such volume
  1321.         ioErr                -36        I/O error
  1322.         bdNamErr            -37        Bad filename
  1323.         fnfErr                -43        File not found
  1324.         fLckdErr            -45        File is locked
  1325.         paramErr            -50        No default volume
  1326.         dirNFErr            -120    Directory not found or incomplete pathname
  1327.         afpAccessDenied        -5000    User does not have the correct access
  1328.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1329.     
  1330.     __________
  1331.     
  1332.     Also see:    CheckObjectLock
  1333. */
  1334.  
  1335. /*****************************************************************************/
  1336.  
  1337. pascal    OSErr    GetFileSize(short vRefNum,
  1338.                             long dirID,
  1339.                             ConstStr255Param fileName,
  1340.                             long *dataSize,
  1341.                             long *rsrcSize);
  1342. /*    ¶ Get the logical sizes of a file's forks.
  1343.     The GetFileSize function returns the logical size of a file's
  1344.     data and resource fork.
  1345.     
  1346.     vRefNum        input:    Volume specification.
  1347.     dirID        input:    Directory ID.
  1348.     name        input:    The name of the file.
  1349.     dataSize    output:    The number of bytes in the file's data fork.
  1350.     rsrcSize    output:    The number of bytes in the file's resource fork.
  1351.     
  1352.     Result Codes
  1353.         noErr                0        No error
  1354.         nsvErr                -35        No such volume
  1355.         ioErr                -36        I/O error
  1356.         bdNamErr            -37        Bad filename
  1357.         fnfErr                -43        File not found
  1358.         paramErr            -50        No default volume
  1359.         dirNFErrdirNFErr    -120    Directory not found or incomplete pathname
  1360.         afpAccessDenied        -5000    User does not have the correct access
  1361.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1362.     
  1363.     __________
  1364.     
  1365.     See also:    FSpGetFileSize
  1366. */
  1367.  
  1368. /*****************************************************************************/
  1369.  
  1370. pascal    OSErr    FSpGetFileSize(const FSSpec *spec,
  1371.                                long *dataSize,
  1372.                                long *rsrcSize);
  1373. /*    ¶ Get the logical sizes of a file's forks.
  1374.     The FSpGetFileSize function returns the logical size of a file's
  1375.     data and resource fork.
  1376.     
  1377.     spec        input:    An FSSpec record specifying the file.
  1378.     dataSize    output:    The number of bytes in the file's data fork.
  1379.     rsrcSize    output:    The number of bytes in the file's resource fork.
  1380.     
  1381.     Result Codes
  1382.         noErr                0        No error
  1383.         nsvErr                -35        No such volume
  1384.         ioErr                -36        I/O error
  1385.         bdNamErr            -37        Bad filename
  1386.         fnfErr                -43        File not found
  1387.         paramErr            -50        No default volume
  1388.         dirNFErrdirNFErr    -120    Directory not found or incomplete pathname
  1389.         afpAccessDenied        -5000    User does not have the correct access
  1390.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1391.     
  1392.     __________
  1393.     
  1394.     See also:    GetFileSize
  1395. */
  1396.  
  1397. /*****************************************************************************/
  1398.  
  1399. pascal    OSErr    BumpDate(short vRefNum,
  1400.                          long dirID,
  1401.                          ConstStr255Param name);
  1402. /*    ¶ Update the modification date of a file or directory.
  1403.     The BumpDate function changes the modification date of a file or
  1404.     directory to the current date/time.  If the modification date is already
  1405.     equal to the current date/time, then add one second to the
  1406.     modification date.
  1407.     
  1408.     vRefNum    input:    Volume specification.
  1409.     dirID    input:    Directory ID.
  1410.     name    input:    Pointer to object name, or nil when dirID specifies
  1411.                     a directory that's the object.
  1412.     
  1413.     Result Codes
  1414.         noErr                0        No error
  1415.         nsvErr                -35        No such volume
  1416.         ioErr                -36        I/O error
  1417.         bdNamErr            -37        Bad filename
  1418.         fnfErr                -43        File not found
  1419.         fLckdErr            -45        File is locked
  1420.         vLckdErr            -46        Volume is locked or read-only
  1421.         paramErr            -50        No default volume
  1422.         dirNFErr            -120    Directory not found or incomplete pathname
  1423.         afpAccessDenied        -5000    User does not have the correct access
  1424.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1425.     
  1426.     __________
  1427.     
  1428.     See also:    FSpBumpDate
  1429. */
  1430.  
  1431. /*****************************************************************************/
  1432.  
  1433. pascal    OSErr    FSpBumpDate(const FSSpec *spec);
  1434. /*    ¶ Update the modification date of a file or directory.
  1435.     The FSpBumpDate function changes the modification date of a file or
  1436.     directory to the current date/time.  If the modification date is already
  1437.     equal to the current date/time, then add one second to the
  1438.     modification date.
  1439.     
  1440.     spec    input:    An FSSpec record specifying the object.
  1441.     
  1442.     Result Codes
  1443.         noErr                0        No error
  1444.         nsvErr                -35        No such volume
  1445.         ioErr                -36        I/O error
  1446.         bdNamErr            -37        Bad filename
  1447.         fnfErr                -43        File not found
  1448.         fLckdErr            -45        File is locked
  1449.         vLckdErr            -46        Volume is locked or read-only
  1450.         paramErr            -50        No default volume
  1451.         dirNFErr            -120    Directory not found or incomplete pathname
  1452.         afpAccessDenied        -5000    User does not have the correct access
  1453.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1454.     
  1455.     __________
  1456.     
  1457.     See also:    BumpDate
  1458. */
  1459.  
  1460. /*****************************************************************************/
  1461.  
  1462. pascal    OSErr    ChangeCreatorType(short vRefNum,
  1463.                                   long dirID,
  1464.                                   ConstStr255Param name,
  1465.                                   OSType creator,
  1466.                                   OSType fileType);
  1467. /*    ¶ Change the creator or file type of a file.
  1468.     The ChangeCreatorType function changes the creator or file type of a file.
  1469.  
  1470.     vRefNum        input:    Volume specification.
  1471.     dirID        input:    Directory ID.
  1472.     name        input:    The name of the file.
  1473.     creator        input:    The new creator type or 0x00000000 to leave
  1474.                         the creator type alone.
  1475.     fileType    input:    The new file type or 0x00000000 to leave the
  1476.                         file type alone.
  1477.     
  1478.     Result Codes
  1479.         noErr                0        No error
  1480.         nsvErr                -35        No such volume
  1481.         ioErr                -36        I/O error
  1482.         bdNamErr            -37        Bad filename
  1483.         fnfErr                -43        File not found
  1484.         fLckdErr            -45        File is locked
  1485.         vLckdErr            -46        Volume is locked or read-only
  1486.         paramErr            -50        No default volume
  1487.         dirNFErr            -120    Directory not found or incomplete pathname
  1488.         notAFileErr            -1302    Name was not a file
  1489.         afpAccessDenied        -5000    User does not have the correct access
  1490.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1491.     
  1492.     __________
  1493.     
  1494.     See also:    FSpChangeCreatorType
  1495. */
  1496.  
  1497. /*****************************************************************************/
  1498.  
  1499. pascal    OSErr    FSpChangeCreatorType(const FSSpec *spec,
  1500.                                      OSType creator,
  1501.                                      OSType fileType);
  1502. /*    ¶ Change the creator or file type of a file.
  1503.     The FSpChangeCreatorType function changes the creator or file type of a file.
  1504.  
  1505.     spec        input:    An FSSpec record specifying the file.
  1506.     creator        input:    The new creator type or 0x00000000 to leave
  1507.                         the creator type alone.
  1508.     fileType    input:    The new file type or 0x00000000 to leave the
  1509.                         file type alone.
  1510.     
  1511.     Result Codes
  1512.         noErr                0        No error
  1513.         nsvErr                -35        No such volume
  1514.         ioErr                -36        I/O error
  1515.         bdNamErr            -37        Bad filename
  1516.         fnfErr                -43        File not found
  1517.         fLckdErr            -45        File is locked
  1518.         vLckdErr            -46        Volume is locked or read-only
  1519.         paramErr            -50        No default volume
  1520.         dirNFErr            -120    Directory not found or incomplete pathname
  1521.         notAFileErr            -1302    Name was not a file
  1522.         afpAccessDenied        -5000    User does not have the correct access
  1523.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1524.     
  1525.     __________
  1526.     
  1527.     See also:    ChangeCreatorType
  1528. */
  1529.  
  1530. /*****************************************************************************/
  1531.  
  1532. pascal    OSErr    ChangeFDFlags(short vRefNum,
  1533.                               long dirID,
  1534.                               ConstStr255Param name,
  1535.                               Boolean    setBits,
  1536.                               unsigned short flagBits);
  1537. /*    ¶ Set or clear Finder Flag bits.
  1538.     The ChangeFDFlags function sets or clears Finder Flag bits in the
  1539.     fdFlags field of a file or directory's FInfo record.
  1540.     
  1541.     vRefNum        input:    Volume specification.
  1542.     dirID        input:    Directory ID.
  1543.     name        input:    Pointer to object name, or nil when dirID specifies
  1544.                         a directory that's the object.
  1545.     setBits        input:    If true, then set the bits specified in flagBits.
  1546.                         If false, then clear the bits specified in flagBits.
  1547.     flagBits    input:    The flagBits parameter specifies which Finder Flag
  1548.                         bits to set or clear. If a bit in flagBits is set,
  1549.                         then the same bit in fdFlags is either set or
  1550.                         cleared depending on the state of the setBits
  1551.                         parameter.
  1552.     
  1553.     Result Codes
  1554.         noErr                0        No error
  1555.         nsvErr                -35        No such volume
  1556.         ioErr                -36        I/O error
  1557.         bdNamErr            -37        Bad filename
  1558.         fnfErr                -43        File not found
  1559.         fLckdErr            -45        File is locked
  1560.         vLckdErr            -46        Volume is locked or read-only
  1561.         paramErr            -50        No default volume
  1562.         dirNFErr            -120    Directory not found or incomplete pathname
  1563.         afpAccessDenied        -5000    User does not have the correct access
  1564.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1565.     
  1566.     __________
  1567.     
  1568.     See also:    FSpChangeFDFlags
  1569. */
  1570.  
  1571. /*****************************************************************************/
  1572.  
  1573. pascal    OSErr    FSpChangeFDFlags(const FSSpec *spec,
  1574.                                  Boolean setBits,
  1575.                                  unsigned short flagBits);
  1576. /*    ¶ Set or clear Finder Flag bits.
  1577.     The FSpChangeFDFlags function sets or clears Finder Flag bits in the
  1578.     fdFlags field of a file or directory's FInfo record.
  1579.     
  1580.     spec        input:    An FSSpec record specifying the object.
  1581.     setBits        input:    If true, then set the bits specified in flagBits.
  1582.                         If false, then clear the bits specified in flagBits.
  1583.     flagBits    input:    The flagBits parameter specifies which Finder Flag
  1584.                         bits to set or clear. If a bit in flagBits is set,
  1585.                         then the same bit in fdFlags is either set or
  1586.                         cleared depending on the state of the setBits
  1587.                         parameter.
  1588.     
  1589.     Result Codes
  1590.         noErr                0        No error
  1591.         nsvErr                -35        No such volume
  1592.         ioErr                -36        I/O error
  1593.         bdNamErr            -37        Bad filename
  1594.         fnfErr                -43        File not found
  1595.         fLckdErr            -45        File is locked
  1596.         vLckdErr            -46        Volume is locked or read-only
  1597.         paramErr            -50        No default volume
  1598.         dirNFErr            -120    Directory not found or incomplete pathname
  1599.         afpAccessDenied        -5000    User does not have the correct access
  1600.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1601.     
  1602.     __________
  1603.     
  1604.     See also:    ChangeFDFlags
  1605. */
  1606.  
  1607. /*****************************************************************************/
  1608.  
  1609. pascal    OSErr    SetIsInvisible(short vRefNum,
  1610.                                long dirID,
  1611.                                ConstStr255Param name);
  1612. /*    ¶ Set the invisible Finder Flag bit.
  1613.     The SetIsInvisible function sets the invisible bit in the fdFlags
  1614.     word of the specified file or directory's finder information.
  1615.     
  1616.     vRefNum    input:    Volume specification.
  1617.     dirID    input:    Directory ID.
  1618.     name    input:    Pointer to object name, or nil when dirID specifies
  1619.                     a directory that's the object.
  1620.     
  1621.     Result Codes
  1622.         noErr                0        No error
  1623.         nsvErr                -35        No such volume
  1624.         ioErr                -36        I/O error
  1625.         bdNamErr            -37        Bad filename
  1626.         fnfErr                -43        File not found
  1627.         fLckdErr            -45        File is locked
  1628.         vLckdErr            -46        Volume is locked or read-only
  1629.         paramErr            -50        No default volume
  1630.         dirNFErr            -120    Directory not found or incomplete pathname
  1631.         afpAccessDenied        -5000    User does not have the correct access
  1632.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1633.     
  1634.     __________
  1635.     
  1636.     See also:    FSpSetIsInvisible, ClearIsInvisible, FSpClearIsInvisible
  1637. */
  1638.  
  1639. /*****************************************************************************/
  1640.  
  1641. pascal    OSErr    FSpSetIsInvisible(const FSSpec *spec);
  1642. /*    ¶ Set the invisible Finder Flag bit.
  1643.     The FSpSetIsInvisible function sets the invisible bit in the fdFlags
  1644.     word of the specified file or directory's finder information.
  1645.     
  1646.     spec    input:    An FSSpec record specifying the object.
  1647.     
  1648.     Result Codes
  1649.         noErr                0        No error
  1650.         nsvErr                -35        No such volume
  1651.         ioErr                -36        I/O error
  1652.         bdNamErr            -37        Bad filename
  1653.         fnfErr                -43        File not found
  1654.         fLckdErr            -45        File is locked
  1655.         vLckdErr            -46        Volume is locked or read-only
  1656.         paramErr            -50        No default volume
  1657.         dirNFErr            -120    Directory not found or incomplete pathname
  1658.         afpAccessDenied        -5000    User does not have the correct access
  1659.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1660.     
  1661.     __________
  1662.     
  1663.     See also:    SetIsInvisible, ClearIsInvisible, FSpClearIsInvisible
  1664. */
  1665.  
  1666. /*****************************************************************************/
  1667.  
  1668. pascal    OSErr    ClearIsInvisible(short vRefNum,
  1669.                                  long dirID,
  1670.                                  ConstStr255Param name);
  1671. /*    ¶ Clear the invisible Finder Flag bit.
  1672.     The ClearIsInvisible function clears the invisible bit in the fdFlags
  1673.     word of the specified file or directory's finder information.
  1674.     
  1675.     vRefNum    input:    Volume specification.
  1676.     dirID    input:    Directory ID.
  1677.     name    input:    Pointer to object name, or nil when dirID specifies
  1678.                     a directory that's the object.
  1679.     
  1680.     Result Codes
  1681.         noErr                0        No error
  1682.         nsvErr                -35        No such volume
  1683.         ioErr                -36        I/O error
  1684.         bdNamErr            -37        Bad filename
  1685.         fnfErr                -43        File not found
  1686.         fLckdErr            -45        File is locked
  1687.         vLckdErr            -46        Volume is locked or read-only
  1688.         paramErr            -50        No default volume
  1689.         dirNFErr            -120    Directory not found or incomplete pathname
  1690.         afpAccessDenied        -5000    User does not have the correct access
  1691.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1692.     
  1693.     __________
  1694.     
  1695.     See also:    SetIsInvisible, FSpSetIsInvisible, FSpClearIsInvisible
  1696. */
  1697.  
  1698. /*****************************************************************************/
  1699.  
  1700. pascal    OSErr    FSpClearIsInvisible(const FSSpec *spec);
  1701. /*    ¶ Clear the invisible Finder Flag bit.
  1702.     The FSpClearIsInvisible function clears the invisible bit in the fdFlags
  1703.     word of the specified file or directory's finder information.
  1704.     
  1705.     spec    input:    An FSSpec record specifying the object.
  1706.     
  1707.     Result Codes
  1708.         noErr                0        No error
  1709.         nsvErr                -35        No such volume
  1710.         ioErr                -36        I/O error
  1711.         bdNamErr            -37        Bad filename
  1712.         fnfErr                -43        File not found
  1713.         fLckdErr            -45        File is locked
  1714.         vLckdErr            -46        Volume is locked or read-only
  1715.         paramErr            -50        No default volume
  1716.         dirNFErr            -120    Directory not found or incomplete pathname
  1717.         afpAccessDenied        -5000    User does not have the correct access
  1718.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1719.     
  1720.     __________
  1721.     
  1722.     See also:    SetIsInvisible, FSpSetIsInvisible, ClearIsInvisible
  1723. */
  1724.  
  1725. /*****************************************************************************/
  1726.  
  1727. pascal    OSErr    SetNameLocked(short vRefNum,
  1728.                               long dirID,
  1729.                               ConstStr255Param name);
  1730. /*    ¶ Set the nameLocked Finder Flag bit.
  1731.     The SetNameLocked function sets the nameLocked bit in the fdFlags word
  1732.     of the specified file or directory's finder information.
  1733.     
  1734.     vRefNum    input:    Volume specification.
  1735.     dirID    input:    Directory ID.
  1736.     name    input:    Pointer to object name, or nil when dirID specifies
  1737.                     a directory that's the object.
  1738.     
  1739.     Result Codes
  1740.         noErr                0        No error
  1741.         nsvErr                -35        No such volume
  1742.         ioErr                -36        I/O error
  1743.         bdNamErr            -37        Bad filename
  1744.         fnfErr                -43        File not found
  1745.         fLckdErr            -45        File is locked
  1746.         vLckdErr            -46        Volume is locked or read-only
  1747.         paramErr            -50        No default volume
  1748.         dirNFErr            -120    Directory not found or incomplete pathname
  1749.         afpAccessDenied        -5000    User does not have the correct access
  1750.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1751.     
  1752.     __________
  1753.     
  1754.     See also:    FSpSetNameLocked, ClearNameLocked, FSpClearNameLocked
  1755. */
  1756.  
  1757. /*****************************************************************************/
  1758.  
  1759. pascal    OSErr    FSpSetNameLocked(const FSSpec *spec);
  1760. /*    ¶ Set the nameLocked Finder Flag bit.
  1761.     The FSpSetNameLocked function sets the nameLocked bit in the fdFlags word
  1762.     of the specified file or directory's finder information.
  1763.     
  1764.     spec    input:    An FSSpec record specifying the object.
  1765.     
  1766.     Result Codes
  1767.         noErr                0        No error
  1768.         nsvErr                -35        No such volume
  1769.         ioErr                -36        I/O error
  1770.         bdNamErr            -37        Bad filename
  1771.         fnfErr                -43        File not found
  1772.         fLckdErr            -45        File is locked
  1773.         vLckdErr            -46        Volume is locked or read-only
  1774.         paramErr            -50        No default volume
  1775.         dirNFErr            -120    Directory not found or incomplete pathname
  1776.         afpAccessDenied        -5000    User does not have the correct access
  1777.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1778.     
  1779.     __________
  1780.     
  1781.     See also:    SetNameLocked, ClearNameLocked, FSpClearNameLocked
  1782. */
  1783.  
  1784. /*****************************************************************************/
  1785.  
  1786. pascal    OSErr    ClearNameLocked(short vRefNum,
  1787.                                 long dirID,
  1788.                                 ConstStr255Param name);
  1789. /*    ¶ Clear the nameLocked Finder Flag bit.
  1790.     The ClearNameLocked function clears the nameLocked bit in the fdFlags
  1791.     word of the specified file or directory's finder information.
  1792.     
  1793.     vRefNum    input:    Volume specification.
  1794.     dirID    input:    Directory ID.
  1795.     name    input:    Pointer to object name, or nil when dirID specifies
  1796.                     a directory that's the object.
  1797.     
  1798.     Result Codes
  1799.         noErr                0        No error
  1800.         nsvErr                -35        No such volume
  1801.         ioErr                -36        I/O error
  1802.         bdNamErr            -37        Bad filename
  1803.         fnfErr                -43        File not found
  1804.         fLckdErr            -45        File is locked
  1805.         vLckdErr            -46        Volume is locked or read-only
  1806.         paramErr            -50        No default volume
  1807.         dirNFErr            -120    Directory not found or incomplete pathname
  1808.         afpAccessDenied        -5000    User does not have the correct access
  1809.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1810.     
  1811.     __________
  1812.     
  1813.     See also:    SetNameLocked, FSpSetNameLocked, FSpClearNameLocked
  1814. */
  1815.  
  1816. /*****************************************************************************/
  1817.  
  1818. pascal    OSErr    FSpClearNameLocked(const FSSpec *spec);
  1819. /*    ¶ Clear the nameLocked Finder Flag bit.
  1820.     The FSpClearNameLocked function clears the nameLocked bit in the fdFlags
  1821.     word of the specified file or directory's finder information.
  1822.     
  1823.     spec    input:    An FSSpec record specifying the object.
  1824.     
  1825.     Result Codes
  1826.         noErr                0        No error
  1827.         nsvErr                -35        No such volume
  1828.         ioErr                -36        I/O error
  1829.         bdNamErr            -37        Bad filename
  1830.         fnfErr                -43        File not found
  1831.         fLckdErr            -45        File is locked
  1832.         vLckdErr            -46        Volume is locked or read-only
  1833.         paramErr            -50        No default volume
  1834.         dirNFErr            -120    Directory not found or incomplete pathname
  1835.         afpAccessDenied        -5000    User does not have the correct access
  1836.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1837.     
  1838.     __________
  1839.     
  1840.     See also:    SetNameLocked, FSpSetNameLocked, ClearNameLocked
  1841. */
  1842.  
  1843. /*****************************************************************************/
  1844.  
  1845. pascal    OSErr    SetIsStationery(short vRefNum,
  1846.                                 long dirID,
  1847.                                 ConstStr255Param name);
  1848. /*    ¶ Set the isStationery Finder Flag bit.
  1849.     The SetIsStationery function sets the isStationery bit in the
  1850.     fdFlags word of the specified file or directory's finder information.
  1851.     
  1852.     vRefNum    input:    Volume specification.
  1853.     dirID    input:    Directory ID.
  1854.     name    input:    Pointer to object name, or nil when dirID specifies
  1855.                     a directory that's the object.
  1856.     
  1857.     Result Codes
  1858.         noErr                0        No error
  1859.         nsvErr                -35        No such volume
  1860.         ioErr                -36        I/O error
  1861.         bdNamErr            -37        Bad filename
  1862.         fnfErr                -43        File not found
  1863.         fLckdErr            -45        File is locked
  1864.         vLckdErr            -46        Volume is locked or read-only
  1865.         paramErr            -50        No default volume
  1866.         dirNFErr            -120    Directory not found or incomplete pathname
  1867.         afpAccessDenied        -5000    User does not have the correct access
  1868.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1869.     
  1870.     __________
  1871.     
  1872.     See also:    FSpSetIsStationery, ClearIsStationery, FSpClearIsStationery
  1873. */
  1874.  
  1875. /*****************************************************************************/
  1876.  
  1877. pascal    OSErr    FSpSetIsStationery(const FSSpec *spec);
  1878. /*    ¶ Set the isStationery Finder Flag bit.
  1879.     The FSpSetIsStationery function sets the isStationery bit in the
  1880.     fdFlags word of the specified file or directory's finder information.
  1881.     
  1882.     spec    input:    An FSSpec record specifying the object.
  1883.     
  1884.     Result Codes
  1885.         noErr                0        No error
  1886.         nsvErr                -35        No such volume
  1887.         ioErr                -36        I/O error
  1888.         bdNamErr            -37        Bad filename
  1889.         fnfErr                -43        File not found
  1890.         fLckdErr            -45        File is locked
  1891.         vLckdErr            -46        Volume is locked or read-only
  1892.         paramErr            -50        No default volume
  1893.         dirNFErr            -120    Directory not found or incomplete pathname
  1894.         afpAccessDenied        -5000    User does not have the correct access
  1895.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1896.     
  1897.     __________
  1898.     
  1899.     See also:    SetIsStationery, ClearIsStationery, FSpClearIsStationery
  1900. */
  1901.  
  1902. /*****************************************************************************/
  1903.  
  1904. pascal    OSErr    ClearIsStationery(short vRefNum,
  1905.                                   long dirID,
  1906.                                   ConstStr255Param name);
  1907. /*    ¶ Clear the isStationery Finder Flag bit.
  1908.     The ClearIsStationery function clears the isStationery bit in the
  1909.     fdFlags word of the specified file or directory's finder information.
  1910.     
  1911.     vRefNum    input:    Volume specification.
  1912.     dirID    input:    Directory ID.
  1913.     name    input:    Pointer to object name, or nil when dirID specifies
  1914.                     a directory that's the object.
  1915.     
  1916.     Result Codes
  1917.         noErr                0        No error
  1918.         nsvErr                -35        No such volume
  1919.         ioErr                -36        I/O error
  1920.         bdNamErr            -37        Bad filename
  1921.         fnfErr                -43        File not found
  1922.         fLckdErr            -45        File is locked
  1923.         vLckdErr            -46        Volume is locked or read-only
  1924.         paramErr            -50        No default volume
  1925.         dirNFErr            -120    Directory not found or incomplete pathname
  1926.         afpAccessDenied        -5000    User does not have the correct access
  1927.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1928.     
  1929.     __________
  1930.     
  1931.     See also:    SetIsStationery, FSpSetIsStationery, FSpClearIsStationery
  1932. */
  1933.  
  1934. /*****************************************************************************/
  1935.  
  1936. pascal    OSErr    FSpClearIsStationery(const FSSpec *spec);
  1937. /*    ¶ Clear the isStationery Finder Flag bit.
  1938.     The FSpClearIsStationery function clears the isStationery bit in the
  1939.     fdFlags word of the specified file or directory's finder information.
  1940.     
  1941.     spec    input:    An FSSpec record specifying the object.
  1942.     
  1943.     Result Codes
  1944.         noErr                0        No error
  1945.         nsvErr                -35        No such volume
  1946.         ioErr                -36        I/O error
  1947.         bdNamErr            -37        Bad filename
  1948.         fnfErr                -43        File not found
  1949.         fLckdErr            -45        File is locked
  1950.         vLckdErr            -46        Volume is locked or read-only
  1951.         paramErr            -50        No default volume
  1952.         dirNFErr            -120    Directory not found or incomplete pathname
  1953.         afpAccessDenied        -5000    User does not have the correct access
  1954.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1955.     
  1956.     __________
  1957.     
  1958.     See also:    SetIsStationery, FSpSetIsStationery, ClearIsStationery
  1959. */
  1960.  
  1961. /*****************************************************************************/
  1962.  
  1963. pascal    OSErr    SetHasCustomIcon(short vRefNum,
  1964.                                  long dirID,
  1965.                                  ConstStr255Param name);
  1966. /*    ¶ Set the hasCustomIcon Finder Flag bit.
  1967.     The SetHasCustomIcon function sets the hasCustomIcon bit in the
  1968.     fdFlags word of the specified file or directory's finder information.
  1969.     
  1970.     vRefNum    input:    Volume specification.
  1971.     dirID    input:    Directory ID.
  1972.     name    input:    Pointer to object name, or nil when dirID specifies
  1973.                     a directory that's the object.
  1974.     
  1975.     Result Codes
  1976.         noErr                0        No error
  1977.         nsvErr                -35        No such volume
  1978.         ioErr                -36        I/O error
  1979.         bdNamErr            -37        Bad filename
  1980.         fnfErr                -43        File not found
  1981.         fLckdErr            -45        File is locked
  1982.         vLckdErr            -46        Volume is locked or read-only
  1983.         paramErr            -50        No default volume
  1984.         dirNFErr            -120    Directory not found or incomplete pathname
  1985.         afpAccessDenied        -5000    User does not have the correct access
  1986.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  1987.     
  1988.     __________
  1989.     
  1990.     See also:    FSpSetHasCustomIcon, ClearHasCustomIcon, FSpClearHasCustomIcon
  1991. */
  1992.  
  1993. /*****************************************************************************/
  1994.  
  1995. pascal    OSErr    FSpSetHasCustomIcon(const FSSpec *spec);
  1996. /*    ¶ Set the hasCustomIcon Finder Flag bit.
  1997.     The FSpSetHasCustomIcon function sets the hasCustomIcon bit in the
  1998.     fdFlags word of the specified file or directory's finder information.
  1999.     
  2000.     spec    input:    An FSSpec record specifying the object.
  2001.     
  2002.     Result Codes
  2003.         noErr                0        No error
  2004.         nsvErr                -35        No such volume
  2005.         ioErr                -36        I/O error
  2006.         bdNamErr            -37        Bad filename
  2007.         fnfErr                -43        File not found
  2008.         fLckdErr            -45        File is locked
  2009.         vLckdErr            -46        Volume is locked or read-only
  2010.         paramErr            -50        No default volume
  2011.         dirNFErr            -120    Directory not found or incomplete pathname
  2012.         afpAccessDenied        -5000    User does not have the correct access
  2013.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  2014.     
  2015.     __________
  2016.     
  2017.     See also:    SetHasCustomIcon, ClearHasCustomIcon, FSpClearHasCustomIcon
  2018. */
  2019.  
  2020. /*****************************************************************************/
  2021.  
  2022. pascal    OSErr    ClearHasCustomIcon(short vRefNum,
  2023.                                    long dirID,
  2024.                                    ConstStr255Param name);
  2025. /*    ¶ Clear the hasCustomIcon Finder Flag bit.
  2026.     The ClearHasCustomIcon function clears the hasCustomIcon bit in the
  2027.     fdFlags word of the specified file or directory's finder information.
  2028.     
  2029.     vRefNum    input:    Volume specification.
  2030.     dirID    input:    Directory ID.
  2031.     name    input:    Pointer to object name, or nil when dirID specifies
  2032.                     a directory that's the object.
  2033.     
  2034.     Result Codes
  2035.         noErr                0        No error
  2036.         nsvErr                -35        No such volume
  2037.         ioErr                -36        I/O error
  2038.         bdNamErr            -37        Bad filename
  2039.         fnfErr                -43        File not found
  2040.         fLckdErr            -45        File is locked
  2041.         vLckdErr            -46        Volume is locked or read-only
  2042.         paramErr            -50        No default volume
  2043.         dirNFErr            -120    Directory not found or incomplete pathname
  2044.         afpAccessDenied        -5000    User does not have the correct access
  2045.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  2046.     
  2047.     __________
  2048.     
  2049.     See also:    SetHasCustomIcon, FSpSetHasCustomIcon, FSpClearHasCustomIcon
  2050. */
  2051.  
  2052. /*****************************************************************************/
  2053.  
  2054. pascal    OSErr    FSpClearHasCustomIcon(const FSSpec *spec);
  2055. /*    ¶ Clear the hasCustomIcon Finder Flag bit.
  2056.     The FSpClearHasCustomIcon function clears the hasCustomIcon bit in the
  2057.     fdFlags word of the specified file or directory's finder information.
  2058.     
  2059.     spec    input:    An FSSpec record specifying the object.
  2060.     
  2061.     Result Codes
  2062.         noErr                0        No error
  2063.         nsvErr                -35        No such volume
  2064.         ioErr                -36        I/O error
  2065.         bdNamErr            -37        Bad filename
  2066.         fnfErr                -43        File not found
  2067.         fLckdErr            -45        File is locked
  2068.         vLckdErr            -46        Volume is locked or read-only
  2069.         paramErr            -50        No default volume
  2070.         dirNFErr            -120    Directory not found or incomplete pathname
  2071.         afpAccessDenied        -5000    User does not have the correct access
  2072.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  2073.     
  2074.     __________
  2075.     
  2076.     See also:    SetHasCustomIcon, FSpSetHasCustomIcon, ClearHasCustomIcon
  2077. */
  2078.  
  2079. /*****************************************************************************/
  2080.  
  2081. pascal    OSErr    ClearHasBeenInited(short vRefNum,
  2082.                                    long dirID,
  2083.                                    ConstStr255Param name);
  2084. /*    ¶ Clear the hasBeenInited Finder Flag bit.
  2085.     The ClearHasBeenInited function clears the hasBeenInited bit in the
  2086.     fdFlags word of the specified file or directory's finder information.
  2087.     
  2088.     vRefNum    input:    Volume specification.
  2089.     dirID    input:    Directory ID.
  2090.     name    input:    Pointer to object name, or nil when dirID specifies
  2091.                     a directory that's the object.
  2092.     
  2093.     Result Codes
  2094.         noErr                0        No error
  2095.         nsvErr                -35        No such volume
  2096.         ioErr                -36        I/O error
  2097.         bdNamErr            -37        Bad filename
  2098.         fnfErr                -43        File not found
  2099.         fLckdErr            -45        File is locked
  2100.         vLckdErr            -46        Volume is locked or read-only
  2101.         paramErr            -50        No default volume
  2102.         dirNFErr            -120    Directory not found or incomplete pathname
  2103.         afpAccessDenied        -5000    User does not have the correct access
  2104.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  2105.     
  2106.     __________
  2107.     
  2108.     See also:    FSpClearHasBeenInited
  2109. */
  2110.  
  2111. /*****************************************************************************/
  2112.  
  2113. pascal    OSErr    FSpClearHasBeenInited(const FSSpec *spec);
  2114. /*    ¶ Clear the hasBeenInited Finder Flag bit.
  2115.     The FSpClearHasBeenInited function clears the hasBeenInited bit in the
  2116.     fdFlags word of the specified file or directory's finder information.
  2117.     
  2118.     spec    input:    An FSSpec record specifying the object.
  2119.     
  2120.     Result Codes
  2121.         noErr                0        No error
  2122.         nsvErr                -35        No such volume
  2123.         ioErr                -36        I/O error
  2124.         bdNamErr            -37        Bad filename
  2125.         fnfErr                -43        File not found
  2126.         fLckdErr            -45        File is locked
  2127.         vLckdErr            -46        Volume is locked or read-only
  2128.         paramErr            -50        No default volume
  2129.         dirNFErr            -120    Directory not found or incomplete pathname
  2130.         afpAccessDenied        -5000    User does not have the correct access
  2131.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  2132.     
  2133.     __________
  2134.     
  2135.     See also:    ClearHasBeenInited
  2136. */
  2137.  
  2138. /*****************************************************************************/
  2139.  
  2140. pascal    OSErr    CopyFileMgrAttributes(short srcVRefNum,
  2141.                                       long srcDirID,
  2142.                                       ConstStr255Param srcName,
  2143.                                       short dstVRefNum,
  2144.                                       long dstDirID,
  2145.                                       ConstStr255Param dstName,
  2146.                                       Boolean copyLockBit);
  2147. /*    ¶ Copy all File Manager attributes from the source to the destination.
  2148.     The CopyFileMgrAttributes function copies all File Manager attributes
  2149.     from the source file or directory to the destination file or directory.
  2150.     If copyLockBit is true, then set the locked state of the destination
  2151.     to match the source.
  2152.  
  2153.     srcVRefNum    input:    Source volume specification.
  2154.     srcDirID    input:    Source directory ID.
  2155.     srcName        input:    Pointer to source object name, or nil when
  2156.                         srcDirID specifies a directory that's the object.
  2157.     dstVRefNum    input:    Destination volume specification.
  2158.     dstDirID    input:    Destination directory ID.
  2159.     dstName        input:    Pointer to destination object name, or nil when
  2160.                         dstDirID specifies a directory that's the object.
  2161.     copyLockBit    input:    If true, set the locked state of the destination
  2162.                         to match the source.
  2163.     
  2164.     Result Codes
  2165.         noErr                0        No error
  2166.         nsvErr                -35        No such volume
  2167.         ioErr                -36        I/O error
  2168.         bdNamErr            -37        Bad filename
  2169.         fnfErr                -43        File not found
  2170.         fLckdErr            -45        File is locked
  2171.         vLckdErr            -46        Volume is locked or read-only
  2172.         paramErr            -50        No default volume
  2173.         dirNFErr            -120    Directory not found or incomplete pathname
  2174.         afpAccessDenied        -5000    User does not have the correct access
  2175.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  2176.     
  2177.     __________
  2178.     
  2179.     See also:    FSpCopyFileMgrAttributes
  2180. */
  2181.  
  2182. /*****************************************************************************/
  2183.  
  2184. pascal    OSErr    FSpCopyFileMgrAttributes(const FSSpec *srcSpec,
  2185.                                          const FSSpec *dstSpec,
  2186.                                          Boolean copyLockBit);
  2187. /*    ¶ Copy all File Manager attributes from the source to the destination.
  2188.     The FSpCopyFileMgrAttributes function copies all File Manager attributes
  2189.     from the source file or directory to the destination file or directory.
  2190.     If copyLockBit is true, then set the locked state of the destination
  2191.     to match the source.
  2192.  
  2193.     srcSpec        input:    An FSSpec record specifying the source object.
  2194.     dstSpec        input:    An FSSpec record specifying the destination object.
  2195.     copyLockBit    input:    If true, set the locked state of the destination
  2196.                         to match the source.
  2197.     
  2198.     Result Codes
  2199.         noErr                0        No error
  2200.         nsvErr                -35        No such volume
  2201.         ioErr                -36        I/O error
  2202.         bdNamErr            -37        Bad filename
  2203.         fnfErr                -43        File not found
  2204.         fLckdErr            -45        File is locked
  2205.         vLckdErr            -46        Volume is locked or read-only
  2206.         paramErr            -50        No default volume
  2207.         dirNFErr            -120    Directory not found or incomplete pathname
  2208.         afpAccessDenied        -5000    User does not have the correct access
  2209.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  2210.     
  2211.     __________
  2212.     
  2213.     See also:    CopyFileMgrAttributes
  2214. */
  2215.  
  2216. /*****************************************************************************/
  2217.  
  2218. pascal    OSErr    HOpenAware(short vRefNum,
  2219.                            long dirID,
  2220.                            ConstStr255Param fileName,
  2221.                            short denyModes,
  2222.                            short *refNum);
  2223. /*    ¶ Open the data fork of a file using deny mode permissions.
  2224.     The HOpenAware function opens the data fork of a file using deny mode
  2225.     permissions instead the normal File Manager permissions.  If OpenDeny
  2226.     is not available, then HOpenAware translates the deny modes to the
  2227.     closest File Manager permissions and tries to open the file with
  2228.     OpenDF first, and then Open if OpenDF isn't available. By using
  2229.     HOpenAware with deny mode permissions, a program can be "AppleShare
  2230.     aware" and fall back on the standard File Manager open calls
  2231.     automatically.
  2232.  
  2233.     vRefNum        input:    Volume specification.
  2234.     dirID        input:    Directory ID.
  2235.     fileName    input:    The name of the file.
  2236.     denyModes    input:    The deny modes access under which to open the file.
  2237.     refNum        output:    The file reference number of the opened file.
  2238.     
  2239.     Result Codes
  2240.         noErr                0        No error
  2241.         nsvErr                -35        No such volume
  2242.         tmfoErr                -42        Too many files open
  2243.         fnfErr                -43        File not found
  2244.         wPrErr                -44        Volume locked by hardware
  2245.         fLckdErr            -45        File is locked
  2246.         vLckdErr            -46        Volume is locked or read-only
  2247.         opWrErr                -49        File already open for writing
  2248.         paramErr            -50        No default volume
  2249.         permErr                 -54        File is already open and cannot be opened using specified deny modes
  2250.         afpAccessDenied        -5000    User does not have the correct access to the file
  2251.         afpDenyConflict        -5006    Requested access permission not possible
  2252.     
  2253.     __________
  2254.     
  2255.     See also:    FSpOpenAware, HOpenRFAware, FSpOpenRFAware
  2256. */
  2257.  
  2258. /*****************************************************************************/
  2259.  
  2260. pascal    OSErr    FSpOpenAware(const FSSpec *spec,
  2261.                              short denyModes,
  2262.                              short *refNum);
  2263. /*    ¶ Open the data fork of a file using deny mode permissions.
  2264.     The FSpOpenAware function opens the data fork of a file using deny mode
  2265.     permissions instead the normal File Manager permissions.  If OpenDeny
  2266.     is not available, then FSpOpenAware translates the deny modes to the
  2267.     closest File Manager permissions and tries to open the file with
  2268.     OpenDF first, and then Open if OpenDF isn't available. By using
  2269.     FSpOpenAware with deny mode permissions, a program can be "AppleShare
  2270.     aware" and fall back on the standard File Manager open calls
  2271.     automatically.
  2272.  
  2273.     spec        input:    An FSSpec record specifying the file.
  2274.     denyModes    input:    The deny modes access under which to open the file.
  2275.     refNum        output:    The file reference number of the opened file.
  2276.     
  2277.     Result Codes
  2278.         noErr                0        No error
  2279.         nsvErr                -35        No such volume
  2280.         tmfoErr                -42        Too many files open
  2281.         fnfErr                -43        File not found
  2282.         wPrErr                -44        Volume locked by hardware
  2283.         fLckdErr            -45        File is locked
  2284.         vLckdErr            -46        Volume is locked or read-only
  2285.         opWrErr                -49        File already open for writing
  2286.         paramErr            -50        No default volume
  2287.         permErr                 -54        File is already open and cannot be opened using specified deny modes
  2288.         afpAccessDenied        -5000    User does not have the correct access to the file
  2289.         afpDenyConflict        -5006    Requested access permission not possible
  2290.     
  2291.     __________
  2292.     
  2293.     See also:    HOpenAware, HOpenRFAware, FSpOpenRFAware
  2294. */
  2295.  
  2296. /*****************************************************************************/
  2297.  
  2298. pascal    OSErr    HOpenRFAware(short vRefNum,
  2299.                              long dirID,
  2300.                              ConstStr255Param fileName,
  2301.                              short denyModes,
  2302.                              short *refNum);
  2303. /*    ¶ Open the resource fork of a file using deny mode permissions.
  2304.     The HOpenRFAware function opens the resource fork of a file using deny
  2305.     mode permissions instead the normal File Manager permissions.  If
  2306.     OpenRFDeny is not available, then HOpenRFAware translates the deny
  2307.     modes to the closest File Manager permissions and tries to open the
  2308.     file with OpenRF. By using HOpenRFAware with deny mode permissions,
  2309.     a program can be "AppleShare aware" and fall back on the standard
  2310.     File Manager open calls automatically.
  2311.  
  2312.     vRefNum        input:    Volume specification.
  2313.     dirID        input:    Directory ID.
  2314.     fileName    input:    The name of the file.
  2315.     denyModes    input:    The deny modes access under which to open the file.
  2316.     refNum        output:    The file reference number of the opened file.
  2317.     
  2318.     Result Codes
  2319.         noErr                0        No error
  2320.         nsvErr                -35        No such volume
  2321.         tmfoErr                -42        Too many files open
  2322.         fnfErr                -43        File not found
  2323.         wPrErr                -44        Volume locked by hardware
  2324.         fLckdErr            -45        File is locked
  2325.         vLckdErr            -46        Volume is locked or read-only
  2326.         opWrErr                -49        File already open for writing
  2327.         paramErr            -50        No default volume
  2328.         permErr                 -54        File is already open and cannot be opened using specified deny modes
  2329.         afpAccessDenied        -5000    User does not have the correct access to the file
  2330.         afpDenyConflict        -5006    Requested access permission not possible
  2331.     
  2332.     __________
  2333.     
  2334.     See also:    HOpenAware, FSpOpenAware, FSpOpenRFAware
  2335. */
  2336.  
  2337. /*****************************************************************************/
  2338.  
  2339. pascal    OSErr    FSpOpenRFAware(const FSSpec *spec,
  2340.                                short denyModes,
  2341.                                short *refNum);
  2342. /*    ¶ Open the resource fork of a file using deny mode permissions.
  2343.     The FSpOpenRFAware function opens the resource fork of a file using deny
  2344.     mode permissions instead the normal File Manager permissions.  If
  2345.     OpenRFDeny is not available, then FSpOpenRFAware translates the deny
  2346.     modes to the closest File Manager permissions and tries to open the
  2347.     file with OpenRF. By using FSpOpenRFAware with deny mode permissions,
  2348.     a program can be "AppleShare aware" and fall back on the standard
  2349.     File Manager open calls automatically.
  2350.  
  2351.     spec        input:    An FSSpec record specifying the file.
  2352.     denyModes    input:    The deny modes access under which to open the file.
  2353.     refNum        output:    The file reference number of the opened file.
  2354.     
  2355.     Result Codes
  2356.         noErr                0        No error
  2357.         nsvErr                -35        No such volume
  2358.         tmfoErr                -42        Too many files open
  2359.         fnfErr                -43        File not found
  2360.         wPrErr                -44        Volume locked by hardware
  2361.         fLckdErr            -45        File is locked
  2362.         vLckdErr            -46        Volume is locked or read-only
  2363.         opWrErr                -49        File already open for writing
  2364.         paramErr            -50        No default volume
  2365.         permErr                 -54        File is already open and cannot be opened using specified deny modes
  2366.         afpAccessDenied        -5000    User does not have the correct access to the file
  2367.         afpDenyConflict        -5006    Requested access permission not possible
  2368.     
  2369.     __________
  2370.     
  2371.     See also:    HOpenAware, FSpOpenAware, HOpenRFAware
  2372. */
  2373.  
  2374. /*****************************************************************************/
  2375.  
  2376. pascal    OSErr    FSReadNoCache(short refNum,
  2377.                               long *count,
  2378.                               void *buffPtr);
  2379. /*    ¶ Read any number of bytes from an open file requesting no caching.
  2380.     The FSReadNoCache function reads any number of bytes from an open file
  2381.     while asking the file system to bypass its cache mechanism.
  2382.     
  2383.     refNum    input:    The file reference number of an open file.
  2384.     count    input:    The number of bytes to read.
  2385.             output:    The number of bytes actually read.
  2386.     buffPtr    input:    A pointer to the data buffer into which the bytes are
  2387.                     to be read.
  2388.     
  2389.     Result Codes
  2390.         noErr                0        No error
  2391.         readErr                –19        Driver does not respond to read requests
  2392.         badUnitErr            –21        Driver reference number does not
  2393.                                     match unit table
  2394.         unitEmptyErr        –22        Driver reference number specifies a
  2395.                                     nil handle in unit table
  2396.         abortErr            –27        Request aborted by KillIO
  2397.         notOpenErr            –28        Driver not open
  2398.         ioErr                –36        Data does not match in read-verify mode
  2399.         fnOpnErr            -38        File not open
  2400.         rfNumErr            -51        Bad reference number
  2401.         afpAccessDenied        -5000    User does not have the correct access to
  2402.                                     the file
  2403.  
  2404.     __________
  2405.     
  2406.     See also:    FSWriteNoCache
  2407. */
  2408.  
  2409. /*****************************************************************************/
  2410.  
  2411. pascal    OSErr    FSWriteNoCache(short refNum,
  2412.                                long *count,
  2413.                                const void *buffPtr);
  2414. /*    ¶ Write any number of bytes to an open file requesting no caching.
  2415.     The FSReadNoCache function writes any number of bytes to an open file
  2416.     while asking the file system to bypass its cache mechanism.
  2417.     
  2418.     refNum    input:    The file reference number of an open file.
  2419.     count    input:    The number of bytes to write to the file.
  2420.             output:    The number of bytes actually written.
  2421.     buffPtr    input:    A pointer to the data buffer from which the bytes are
  2422.                     to be written.
  2423.     
  2424.     Result Codes
  2425.         noErr                0        No error
  2426.         writErr                –20        Driver does not respond to write requests
  2427.         badUnitErr            –21        Driver reference number does not
  2428.                                     match unit table
  2429.         unitEmptyErr        –22        Driver reference number specifies a
  2430.                                     nil handle in unit table
  2431.         abortErr            –27        Request aborted by KillIO
  2432.         notOpenErr            –28        Driver not open
  2433.         dskFulErr            -34        Disk full    
  2434.         ioErr                –36        Data does not match in read-verify mode
  2435.         fnOpnErr            -38        File not open
  2436.         wPrErr                -44        Hardware volume lock    
  2437.         fLckdErr            -45        File is locked    
  2438.         vLckdErr            -46        Software volume lock    
  2439.         rfNumErr            -51        Bad reference number
  2440.         wrPermErr            -61        Read/write permission doesn’t
  2441.                                     allow writing    
  2442.         afpAccessDenied        -5000    User does not have the correct access to
  2443.                                     the file
  2444.  
  2445.     __________
  2446.     
  2447.     See also:    FSReadNoCache
  2448. */
  2449.  
  2450. /*****************************************************************************/
  2451.  
  2452. pascal    OSErr    FSWriteVerify(short refNum,
  2453.                               long *count,
  2454.                               const void *buffPtr);
  2455. /*    ¶ Write any number of bytes to an open file and then verify the data was written.
  2456.     The FSWriteVerify function writes any number of bytes to an open file
  2457.     and then verifies that the data was actually written to the device.
  2458.     
  2459.     refNum    input:    The file reference number of an open file.
  2460.     count    input:    The number of bytes to write to the file.
  2461.             output:    The number of bytes actually written and verified.
  2462.     buffPtr    input:    A pointer to the data buffer from which the bytes are
  2463.                     to be written.
  2464.     
  2465.     Result Codes
  2466.         noErr                0        No error
  2467.         readErr                –19        Driver does not respond to read requests
  2468.         writErr                –20        Driver does not respond to write requests
  2469.         badUnitErr            –21        Driver reference number does not
  2470.                                     match unit table
  2471.         unitEmptyErr        –22        Driver reference number specifies a
  2472.                                     nil handle in unit table
  2473.         abortErr            –27        Request aborted by KillIO
  2474.         notOpenErr            –28        Driver not open
  2475.         dskFulErr            -34        Disk full    
  2476.         ioErr                –36        Data does not match in read-verify mode
  2477.         fnOpnErr            -38        File not open
  2478.         eofErr                -39        Logical end-of-file reached
  2479.         posErr                -40        Attempt to position mark before start
  2480.                                     of file
  2481.         wPrErr                -44        Hardware volume lock    
  2482.         fLckdErr            -45        File is locked    
  2483.         vLckdErr            -46        Software volume lock    
  2484.         rfNumErr            -51        Bad reference number
  2485.         gfpErr                -52        Error during GetFPos
  2486.         wrPermErr            -61        Read/write permission doesn’t
  2487.                                     allow writing    
  2488.         memFullErr            -108    Not enough room in heap zone to allocate
  2489.                                     verify buffer
  2490.         afpAccessDenied        -5000    User does not have the correct access to
  2491.                                     the file
  2492. */
  2493.  
  2494. /*****************************************************************************/
  2495.  
  2496. pascal    OSErr    CopyFork(short srcRefNum,
  2497.                          short dstRefNum,
  2498.                          void *copyBufferPtr,
  2499.                          long copyBufferSize);
  2500. /*    ¶ Copy all data from the source fork to the destination fork of open file forks.
  2501.     The CopyFork function copies all data from the source fork to the
  2502.     destination fork of open file forks and makes sure the destination EOF
  2503.     is equal to the source EOF.
  2504.     
  2505.     srcRefNum        input:    The source file reference number.
  2506.     dstRefNum        input:    The destination file reference number.
  2507.     copyBufferPtr    input:    Pointer to buffer to use during copy. The
  2508.                             buffer should be at least 512-bytes minimum.
  2509.                             The larger the buffer, the faster the copy.
  2510.     copyBufferSize    input:    The size of the copy buffer.
  2511.     
  2512.     Result Codes
  2513.         noErr                0        No error
  2514.         readErr                –19        Driver does not respond to read requests
  2515.         writErr                –20        Driver does not respond to write requests
  2516.         badUnitErr            –21        Driver reference number does not
  2517.                                     match unit table
  2518.         unitEmptyErr        –22        Driver reference number specifies a
  2519.                                     nil handle in unit table
  2520.         abortErr            –27        Request aborted by KillIO
  2521.         notOpenErr            –28        Driver not open
  2522.         dskFulErr            -34        Disk full    
  2523.         ioErr                –36        Data does not match in read-verify mode
  2524.         fnOpnErr            -38        File not open
  2525.         wPrErr                -44        Hardware volume lock    
  2526.         fLckdErr            -45        File is locked    
  2527.         vLckdErr            -46        Software volume lock    
  2528.         rfNumErr            -51        Bad reference number
  2529.         wrPermErr            -61        Read/write permission doesn’t
  2530.                                     allow writing    
  2531.         afpAccessDenied        -5000    User does not have the correct access to
  2532.                                     the file
  2533. */
  2534.  
  2535. /*****************************************************************************/
  2536.  
  2537. pascal    OSErr    GetFileLocation(short refNum,
  2538.                                 short *vRefNum,
  2539.                                 long *dirID,
  2540.                                 StringPtr fileName);
  2541. /*    ¶ Get the location of an open file.
  2542.     The GetFileLocation function gets the location (volume reference number,
  2543.     directory ID, and fileName) of an open file.
  2544.  
  2545.     refNum        input:    The file reference number of an open file.
  2546.     vRefNum        output:    The volume reference number.
  2547.     dirID        output:    The parent directory ID.
  2548.     fileName    input:    Points to a buffer (minimum Str63) where the
  2549.                         filename is to be returned or must be nil.
  2550.                 output:    The filename.
  2551.     
  2552.     Result Codes
  2553.         noErr                0        No error
  2554.         nsvErr                -35        Specified volume doesn’t exist
  2555.         fnOpnErr            -38        File not open
  2556.         rfNumErr            -51        Reference number specifies nonexistent
  2557.                                     access path
  2558.     
  2559.     __________
  2560.     
  2561.     See also:    FSpGetFileLocation
  2562. */
  2563.  
  2564. /*****************************************************************************/
  2565.  
  2566. pascal    OSErr    FSpGetFileLocation(short refNum,
  2567.                                    FSSpec *spec);
  2568. /*    ¶ Get the location of an open file in an FSSpec record.
  2569.     The FSpGetFileLocation function gets the location of an open file in
  2570.     an FSSpec record.
  2571.  
  2572.     refNum        input:    The file reference number of an open file.
  2573.     spec        output:    FSSpec record containing the file name and location.
  2574.     
  2575.     Result Codes
  2576.         noErr                0        No error
  2577.         nsvErr                -35        Specified volume doesn’t exist
  2578.         fnOpnErr            -38        File not open
  2579.         rfNumErr            -51        Reference number specifies nonexistent
  2580.                                     access path
  2581.     
  2582.     __________
  2583.     
  2584.     See also:    GetFileLocation
  2585. */
  2586.  
  2587. /*****************************************************************************/
  2588.  
  2589. pascal    OSErr    CopyDirectoryAccess(short srcVRefNum,
  2590.                                     long srcDirID,
  2591.                                     ConstStr255Param srcName,
  2592.                                     short dstVRefNum,
  2593.                                     long dstDirID,
  2594.                                     ConstStr255Param dstName);
  2595. /*    ¶ Copy the AFP directory access privileges.
  2596.     The CopyDirectoryAccess function copies the AFP directory access
  2597.     privileges from one directory to another. Both directories must be on
  2598.     the same file server, but not necessarily on the same server volume.
  2599.     
  2600.     srcVRefNum    input:    Source volume specification.
  2601.     srcDirID    input:    Source directory ID.
  2602.     srcName        input:    Pointer to source directory name, or nil when
  2603.                         srcDirID specifies the directory.
  2604.     dstVRefNum    input:    Destination volume specification.
  2605.     dstDirID    input:    Destination directory ID.
  2606.     dstName        input:    Pointer to destination directory name, or nil when
  2607.                         dstDirID specifies the directory.
  2608.     
  2609.     Result Codes
  2610.         noErr                0        No error
  2611.         nsvErr                -35        Volume not found
  2612.         fnfErr                -43        Directory not found
  2613.         vLckdErr            -46        Volume is locked or read-only
  2614.         paramErr            -50        Volume doesn't support this function
  2615.         afpAccessDenied        -5000    User does not have the correct access
  2616.                                     to the directory
  2617.         afpObjectTypeErr    -5025    Object is a file, not a directory
  2618.     
  2619.     __________
  2620.     
  2621.     See also:    FSpCopyDirectoryAccess
  2622. */
  2623.  
  2624. /*****************************************************************************/
  2625.  
  2626. pascal    OSErr    FSpCopyDirectoryAccess(const FSSpec *srcSpec,
  2627.                                        const FSSpec *dstSpec);
  2628. /*    ¶ Copy the AFP directory access privileges.
  2629.     The FSpCopyDirectoryAccess function copies the AFP directory access
  2630.     privileges from one directory to another. Both directories must be on
  2631.     the same file server, but not necessarily on the same server volume.
  2632.  
  2633.     srcSpec        input:    An FSSpec record specifying the source directory.
  2634.     dstSpec        input:    An FSSpec record specifying the destination directory.
  2635.     
  2636.     Result Codes
  2637.         noErr                0        No error
  2638.         nsvErr                -35        Volume not found
  2639.         fnfErr                -43        Directory not found
  2640.         vLckdErr            -46        Volume is locked or read-only
  2641.         paramErr            -50        Volume doesn't support this function
  2642.         afpAccessDenied        -5000    User does not have the correct access
  2643.                                     to the directory
  2644.         afpObjectTypeErr    -5025    Object is a file, not a directory
  2645.     
  2646.     __________
  2647.     
  2648.     See also:    CopyDirectoryAccess
  2649. */
  2650.  
  2651. /*****************************************************************************/
  2652.  
  2653. pascal    OSErr    HMoveRenameCompat(short vRefNum,
  2654.                                   long srcDirID,
  2655.                                   ConstStr255Param srcName,
  2656.                                   long dstDirID,
  2657.                                   ConstStr255Param dstpathName,
  2658.                                   ConstStr255Param copyName);
  2659. /*    ¶ Move a file or directory and optionally rename it.
  2660.     The HMoveRenameCompat function moves a file or directory and optionally
  2661.     renames it.  The source and destination locations must be on the same
  2662.     volume. This routine works even if the volume doesn't support MoveRename.
  2663.     
  2664.     vRefNum        input:    Volume specification.
  2665.     srcDirID    input:    Source directory ID.
  2666.     srcName        input:    The source object name.
  2667.     dstDirID    input:    Destination directory ID.
  2668.     dstName        input:    Pointer to destination directory name, or
  2669.                         nil when dstDirID specifies a directory.
  2670.     copyName    input:    Points to the new name if the object is to be
  2671.                         renamed or nil if the object isn't to be renamed.
  2672.     
  2673.     Result Codes
  2674.         noErr                0        No error
  2675.         dirFulErr            -33        File directory full
  2676.         dskFulErr            -34        Disk is full
  2677.         nsvErr                -35        Volume not found
  2678.         ioErr                -36        I/O error
  2679.         bdNamErr            -37        Bad filename or attempt to move into
  2680.                                     a file
  2681.         fnfErr                -43        Source file or directory not found
  2682.         wPrErr                -44        Hardware volume lock
  2683.         fLckdErr            -45        File is locked
  2684.         vLckdErr            -46        Destination volume is read-only
  2685.         fBsyErr                -47        File busy, directory not empty, or
  2686.                                     working directory control block open
  2687.         dupFNErr            -48        Destination already exists
  2688.         paramErr            -50        Volume doesn't support this function,
  2689.                                     no default volume, or source and
  2690.         volOfflinErr        -53        Volume is offline
  2691.         fsRnErr                -59        Problem during rename
  2692.         dirNFErr            -120    Directory not found or incomplete pathname
  2693.         badMovErr            -122    Attempted to move directory into
  2694.                                     offspring
  2695.         wrgVolTypErr        -123    Not an HFS volume (it's a MFS volume)
  2696.         notAFileErr            -1302    The pathname is nil, the pathname
  2697.                                     is empty, or the pathname cannot refer
  2698.                                     to a filename
  2699.         diffVolErr            -1303    Files on different volumes
  2700.         afpAccessDenied        -5000    The user does not have the right to
  2701.                                     move the file  or directory
  2702.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  2703.         afpSameObjectErr    -5038    Source and destination files are the same
  2704.     
  2705.     __________
  2706.     
  2707.     See also:    FSpMoveRenameCompat
  2708. */
  2709.  
  2710. /*****************************************************************************/
  2711.  
  2712. pascal    OSErr    FSpMoveRenameCompat(const FSSpec *srcSpec,
  2713.                                     const FSSpec *dstSpec,
  2714.                                     ConstStr255Param copyName);
  2715. /*    ¶ Move a file or directory and optionally rename it.
  2716.     The FSpMoveRenameCompat function moves a file or directory and optionally
  2717.     renames it.  The source and destination locations must be on the same
  2718.     volume. This routine works even if the volume doesn't support MoveRename.
  2719.     
  2720.     srcSpec        input:    An FSSpec record specifying the source object.
  2721.     dstSpec        input:    An FSSpec record specifying the destination
  2722.                         directory.
  2723.     copyName    input:    Points to the new name if the object is to be
  2724.                         renamed or nil if the object isn't to be renamed.
  2725.     
  2726.     Result Codes
  2727.         noErr                0        No error
  2728.         dirFulErr            -33        File directory full
  2729.         dskFulErr            -34        Disk is full
  2730.         nsvErr                -35        Volume not found
  2731.         ioErr                -36        I/O error
  2732.         bdNamErr            -37        Bad filename or attempt to move into
  2733.                                     a file
  2734.         fnfErr                -43        Source file or directory not found
  2735.         wPrErr                -44        Hardware volume lock
  2736.         fLckdErr            -45        File is locked
  2737.         vLckdErr            -46        Destination volume is read-only
  2738.         fBsyErr                -47        File busy, directory not empty, or
  2739.                                     working directory control block open
  2740.         dupFNErr            -48        Destination already exists
  2741.         paramErr            -50        Volume doesn't support this function,
  2742.                                     no default volume, or source and
  2743.         volOfflinErr        -53        Volume is offline
  2744.         fsRnErr                -59        Problem during rename
  2745.         dirNFErr            -120    Directory not found or incomplete pathname
  2746.         badMovErr            -122    Attempted to move directory into
  2747.                                     offspring
  2748.         wrgVolTypErr        -123    Not an HFS volume (it's a MFS volume)
  2749.         notAFileErr            -1302    The pathname is nil, the pathname
  2750.                                     is empty, or the pathname cannot refer
  2751.                                     to a filename
  2752.         diffVolErr            -1303    Files on different volumes
  2753.         afpAccessDenied        -5000    The user does not have the right to
  2754.                                     move the file  or directory
  2755.         afpObjectTypeErr    -5025    Directory not found or incomplete pathname
  2756.         afpSameObjectErr    -5038    Source and destination files are the same
  2757.     
  2758.     __________
  2759.     
  2760.     See also:    HMoveRenameCompat
  2761. */
  2762.  
  2763. /*****************************************************************************/
  2764.  
  2765. pascal    void    BuildAFPVolMountInfo(short theFlags,
  2766.                                      char theNBPInterval,
  2767.                                      char theNBPCount,
  2768.                                      short theUAMType,
  2769.                                      Str31 theZoneName,
  2770.                                      Str31 theServerName,
  2771.                                      Str27 theVolName,
  2772.                                      Str31 theUserName,
  2773.                                      Str8 theUserPassWord,
  2774.                                      Str8 theVolPassWord,
  2775.                                      MyAFPVolMountInfo *theAFPInfo);
  2776. /*    ¶ Initialize the fields of an AFPVolMountInfo record.
  2777.     The BuildAFPVolMountInfo function initializes the fields of an
  2778.     AFPVolMountInfo record for use before using that record to call
  2779.     the VolumeMount function.
  2780.     
  2781.     theFlags        input:    The AFP mounting flags. 0 = normal mount;
  2782.                             set bit 0 to inhibit greeting messages.
  2783.     theNBPInterval    input:    The interval used for VolumeMount's
  2784.                             NBP Lookup call. 7 is a good choice.
  2785.     theNBPCount        input:    The retry count used for VolumeMount's
  2786.                             NBP Lookup call. 5 is a good choice.
  2787.     theUAMType        input:    The user authentication method to use.
  2788.     theZoneName        input:    The AppleTalk zone name of the server.
  2789.     theServerName    input:    The AFP server name.
  2790.     theVolName        input:    The AFP volume name.
  2791.     theUserName        input:    The user name (zero length Pascal string for
  2792.                             guest).
  2793.     theUserPassWord    input:    The user password (zero length Pascal string
  2794.                             if no user password)
  2795.     theVolPassWord    input:    The volume password (zero length Pascal string
  2796.                             if no volume password)
  2797.     theAFPInfo        input:    Pointer to AFPVolMountInfo record to
  2798.                             initialize.
  2799.  
  2800.     __________
  2801.     
  2802.     Also see:    GetVolMountInfoSize, GetVolMountInfo, VolumeMount,
  2803.                 RetrieveAFPVolMountInfo
  2804. */
  2805.  
  2806. /*****************************************************************************/
  2807.  
  2808. pascal    OSErr    RetrieveAFPVolMountInfo(AFPVolMountInfoPtr theAFPInfo,
  2809.                                         short *theFlags,
  2810.                                         short *theUAMType,
  2811.                                         StringPtr theZoneName,
  2812.                                         StringPtr theServerName,
  2813.                                         StringPtr theVolName,
  2814.                                         StringPtr theUserName);
  2815. /*    ¶ Retrieve the AFP mounting information from an AFPVolMountInfo record.
  2816.     The RetrieveAFPVolMountInfo function retrieves the AFP mounting
  2817.     information returned in an AFPVolMountInfo record by the
  2818.     GetVolMountInfo function.
  2819.     
  2820.     theAFPInfo        input:    Pointer to AFPVolMountInfo record that contains
  2821.                             the AFP mounting information.
  2822.     theFlags        output:    The AFP mounting flags. 0 = normal mount;
  2823.                             if bit 0 is set, greeting meesages were inhibited.
  2824.     theUAMType        output:    The user authentication method used.
  2825.     theZoneName        output:    The AppleTalk zone name of the server.
  2826.     theServerName    output:    The AFP server name.
  2827.     theVolName        output:    The AFP volume name.
  2828.     theUserName        output:    The user name (zero length Pascal string for
  2829.                             guest).
  2830.     
  2831.     Result Codes
  2832.         noErr                0        No error
  2833.         paramErr            -50        media field in AFP mounting information
  2834.                                     was not AppleShareMediaType
  2835.     
  2836.     __________
  2837.     
  2838.     Also see:    GetVolMountInfoSize, GetVolMountInfo, VolumeMount,
  2839.                 BuildAFPVolMountInfo
  2840. */
  2841.  
  2842. /*****************************************************************************/
  2843.  
  2844. pascal    OSErr    GetUGEntries(short objType,
  2845.                              UGEntryPtr entries,
  2846.                              long reqEntryCount,
  2847.                              long *actEntryCount,
  2848.                              long *objID);
  2849. /*    ¶ Retrieve a list of user or group entries from the local file server.
  2850.     The GetUGEntries functions retrieves a list of user or group entries
  2851.     from the local file server.
  2852.  
  2853.     objType            input:    The object type: -1 = group; 0 = user
  2854.     UGEntries        input:    Pointer to array of UGEntry records where the list
  2855.                             is returned.
  2856.     reqEntryCount    input:    The number of elements in the UGEntries array.
  2857.     actEntryCount    output:    The number of entries returned.
  2858.     objID            input:    The current index position. Set to 0 to start with
  2859.                             the first entry.
  2860.                     output:    The index position to get the next entry. Pass this
  2861.                             value the next time you call GetUGEntries to start
  2862.                             where you left off.
  2863.     
  2864.     Result Codes
  2865.         noErr                0        No error    
  2866.         fnfErr                -43        No more users or groups    
  2867.         paramErr            -50        Function not supported; or, ioObjID is
  2868.                                     negative    
  2869.  
  2870.     __________
  2871.     
  2872.     Also see:    GetUGEntry
  2873. */
  2874.  
  2875. /*****************************************************************************/
  2876.  
  2877. #ifdef __cplusplus
  2878. }
  2879. #endif
  2880.  
  2881. #include "OptimizationEnd.h"
  2882.  
  2883. #endif    /* __MOREFILESEXTRAS__ */
  2884.